| 79 | end |
| 80 | |
| 81 | def test_4 |
| 82 | |
| 83 | # Application class |
| 84 | if !RBA.constants.find { |x| x == :QDialog || x == "QDialog" } |
| 85 | |
| 86 | out = `#{self.klayout_bin} -b -r #{File.join(File.dirname(__FILE__), "test_app.rb")} 2>&1` |
| 87 | assert_equal(out, "RBA::Application superclass Object\nMainWindow is not there\n") |
| 88 | |
| 89 | out = `#{self.klayout_bin} -z -nc -rx -r #{File.join(File.dirname(__FILE__), "test_app.rb")} 2>&1` |
| 90 | assert_equal(out, "RBA::Application superclass Object\nMainWindow is there\n") |
| 91 | |
| 92 | else |
| 93 | |
| 94 | # QCoreApplication for (headless) mode |
| 95 | out = `#{self.klayout_bin} -b -r #{File.join(File.dirname(__FILE__), "test_app.rb")} 2>&1` |
| 96 | assert_equal(out, "RBA::Application superclass RBA::QCoreApplication_Native\nMainWindow is not there\n") |
| 97 | |
| 98 | # QApplication for GUI mode |
| 99 | out = `#{self.klayout_bin} -z -nc -rx -r #{File.join(File.dirname(__FILE__), "test_app.rb")} 2>&1` |
| 100 | assert_equal(out, "RBA::Application superclass RBA::QApplication_Native\nMainWindow is there\n") |
| 101 | |
| 102 | end |
| 103 | |
| 104 | end |
| 105 | |
| 106 | def test_5 |
| 107 |
nothing calls this directly
no test coverage detected