Fixed main app unit test for non-qtbinding build.

This commit is contained in:
Matthias Koefferlein 2018-04-23 23:26:40 +02:00
parent ca9a6db8a5
commit 7c8c4ccf43
1 changed files with 17 additions and 6 deletions

View File

@ -60,14 +60,25 @@ class KLayoutMain_TestClass < TestBase
def test_4
# Application class
if !RBA.constants.find { |x| x == :QDialog }
# QCoreApplication for (headless) mode
out = `./klayout -b -r #{File.join(File.dirname(__FILE__), "test_app.rb")}`
assert_equal(out, "RBA::Application superclass RBA::QCoreApplication_Native\nMainWindow is not there\n")
out = `./klayout -b -r #{File.join(File.dirname(__FILE__), "test_app.rb")}`
assert_equal(out, "RBA::Application superclass Object\nMainWindow is not there\n")
# QApplication for GUI mode
out = `./klayout -z -nc -rx -r #{File.join(File.dirname(__FILE__), "test_app.rb")}`
assert_equal(out, "RBA::Application superclass RBA::QApplication_Native\nMainWindow is there\n")
out = `./klayout -z -nc -rx -r #{File.join(File.dirname(__FILE__), "test_app.rb")}`
assert_equal(out, "RBA::Application superclass Object\nMainWindow is there\n")
else
# QCoreApplication for (headless) mode
out = `./klayout -b -r #{File.join(File.dirname(__FILE__), "test_app.rb")}`
assert_equal(out, "RBA::Application superclass RBA::QCoreApplication_Native\nMainWindow is not there\n")
# QApplication for GUI mode
out = `./klayout -z -nc -rx -r #{File.join(File.dirname(__FILE__), "test_app.rb")}`
assert_equal(out, "RBA::Application superclass RBA::QApplication_Native\nMainWindow is there\n")
end
end