mirror of
https://github.com/KLayout/klayout.git
synced 2026-09-04 08:43:42 +02:00
WIP: fixed unit tests for Qt-less build.
This commit is contained in:
Vendored
+16
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user