WIP: fixed unit tests for Qt-less build.

This commit is contained in:
Matthias Koefferlein
2018-07-10 01:17:35 +02:00
parent 58fd6ed143
commit d2c890ab6d
21 changed files with 585 additions and 458 deletions
+16
View File
@@ -27,6 +27,10 @@ class IMG_TestClass < TestBase
def test_1
if !RBA.constants.member?(:ImageDataMapping)
return
end
dm = RBA::ImageDataMapping.new
dm.gamma = 0.5
assert_equal(dm.gamma, 0.5)
@@ -62,6 +66,10 @@ class IMG_TestClass < TestBase
def test_2
if !RBA.constants.member?(:Image)
return
end
image = RBA::Image.new
assert_equal(image.to_s, "empty:")
assert_equal(image.is_empty?, true)
@@ -181,6 +189,10 @@ class IMG_TestClass < TestBase
def test_3
if !RBA.constants.member?(:Image)
return
end
# compatibility with 0.21
d = []
20000.times { d.push(0.0) }
@@ -197,6 +209,10 @@ class IMG_TestClass < TestBase
def test_4
if !RBA.constants.member?(:Application)
return
end
mw = RBA::Application.instance.main_window
mw.close_all
mw.create_layout(0)