mirror of
https://github.com/KLayout/klayout.git
synced 2026-09-03 06:13:40 +02:00
Merge branch 'master' into lefdef-enhancments
This commit is contained in:
Vendored
+1
@@ -832,6 +832,7 @@ class Basic_TestClass < TestBase
|
||||
|
||||
end
|
||||
|
||||
# TODO: this class is going to be deprecated
|
||||
class X < Data
|
||||
end
|
||||
class Y < Object
|
||||
|
||||
Vendored
+14
-2
@@ -35,11 +35,19 @@ class DBLibrary_TestClass < TestBase
|
||||
lib.register("RBA-unit-test")
|
||||
|
||||
assert_equal(lib.name, "RBA-unit-test")
|
||||
assert_equal(lib.id != 0, true)
|
||||
lib_id = lib.id
|
||||
assert_equal(lib_id != 0, true)
|
||||
|
||||
assert_equal(RBA::Library::library_names.member?("RBA-unit-test"), true)
|
||||
assert_equal(RBA::Library::library_by_name("RBA-unit-test").id, lib.id)
|
||||
assert_equal(RBA::Library::library_by_name("RBA-unit-test").id, lib_id)
|
||||
|
||||
# destroy should not do anything as libraries are not to be removed through the destructor
|
||||
lib._destroy
|
||||
assert_equal(RBA::Library::library_by_name("RBA-unit-test").id, lib_id)
|
||||
assert_equal(lib.destroyed?, true)
|
||||
|
||||
lib = RBA::Library::library_by_name("RBA-unit-test")
|
||||
assert_equal(lib.destroyed?, false)
|
||||
lib.delete
|
||||
assert_equal(RBA::Library::library_by_name("RBA-unit-test"), nil)
|
||||
|
||||
@@ -85,6 +93,10 @@ class DBLibrary_TestClass < TestBase
|
||||
lib.layout.create_cell("X")
|
||||
assert_equal(lib.layout.top_cell.name, "X")
|
||||
|
||||
# this will actually destroy the library as it is not registered
|
||||
lib._destroy
|
||||
assert_equal(lib.destroyed?, true)
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
Vendored
+1
-1
@@ -396,7 +396,7 @@ class IMG_TestClass < TestBase
|
||||
|
||||
end
|
||||
|
||||
def test_4
|
||||
def test_5
|
||||
|
||||
tmp = File::join($ut_testtmp, "tmp.lyimg")
|
||||
|
||||
|
||||
+1
-1
@@ -136,7 +136,7 @@ module Test
|
||||
end
|
||||
|
||||
@@attribute_observers = StringifyKeyHash.new
|
||||
def register_attribute_observer(attribute_name, observer=Proc.new)
|
||||
def register_attribute_observer(attribute_name, &observer)
|
||||
@@attribute_observers[attribute_name] ||= []
|
||||
@@attribute_observers[attribute_name] << observer
|
||||
end
|
||||
|
||||
+4
-4
@@ -15,7 +15,7 @@ module Test
|
||||
PREPARE_HOOKS = []
|
||||
|
||||
class << self
|
||||
def register_runner(id, runner_builder=Proc.new)
|
||||
def register_runner(id, &runner_builder)
|
||||
RUNNERS[id] = runner_builder
|
||||
RUNNERS[id.to_s] = runner_builder
|
||||
end
|
||||
@@ -33,7 +33,7 @@ module Test
|
||||
@@default_runner = id
|
||||
end
|
||||
|
||||
def register_collector(id, collector_builder=Proc.new)
|
||||
def register_collector(id, &collector_builder)
|
||||
COLLECTORS[id] = collector_builder
|
||||
COLLECTORS[id.to_s] = collector_builder
|
||||
end
|
||||
@@ -46,11 +46,11 @@ module Test
|
||||
ColorScheme[id] = scheme
|
||||
end
|
||||
|
||||
def setup_option(option_builder=Proc.new)
|
||||
def setup_option(&option_builder)
|
||||
ADDITIONAL_OPTIONS << option_builder
|
||||
end
|
||||
|
||||
def prepare(hook=Proc.new)
|
||||
def prepare(&hook)
|
||||
PREPARE_HOOKS << hook
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user