Added one more testcase for inserting a plain region into a RDB

This commit is contained in:
Matthias Koefferlein 2019-02-11 19:24:24 +01:00
parent 43014d6923
commit 82ad528dbe
1 changed files with 12 additions and 0 deletions

View File

@ -813,6 +813,18 @@ class RDB_TestClass < TestBase
rdb.each_cell { |c| cn << c.to_s_items }
assert_equal(cn.join(";"), "TOP[polygon: (0,0.001;0,0.03;0.02,0.03;0.02,0.001),polygon: (0.01,0.021;0.01,0.051;0.031,0.051;0.031,0.021),polygon: (0.021,0.042;0.021,0.073;0.043,0.073;0.043,0.042)]")
rdb = RBA::ReportDatabase.new("neu")
cat = rdb.create_category("l1")
r = RBA::Region::new(c1.begin_shapes_rec(l1)).merged
cat.scan_region(rdb.create_cell("TOP"), RBA::CplxTrans::new(0.001), r, true) # flat scan
assert_equal(cat.num_items, 1)
cn = []
rdb.each_cell { |c| cn << c.to_s_test }
assert_equal(cn.join(";"), "TOP[]")
cn = []
rdb.each_cell { |c| cn << c.to_s_items }
assert_equal(cn.join(";"), "TOP[polygon: (0,0.001;0,0.03;0.01,0.03;0.01,0.051;0.021,0.051;0.021,0.073;0.043,0.073;0.043,0.042;0.031,0.042;0.031,0.021;0.02,0.021;0.02,0.001)]")
end
# shape insertion from shape, shapes, recursive iterator