mirror of
https://github.com/KLayout/klayout.git
synced 2026-08-29 01:14:35 +02:00
Texts[n] now also provides a TextWithProperties object. Bugfix: this method was not delivering any objects with properties at all.
This commit is contained in:
Vendored
+3
-1
@@ -233,7 +233,9 @@ class DBRegion_TestClass < TestBase
|
||||
|
||||
r = RBA::Region::new
|
||||
r.insert(RBA::PolygonWithProperties::new(RBA::Box::new(0, 0, 10, 20), { 1 => 'value' }))
|
||||
assert_equal(r[0].to_s, "(0,0;0,20;10,20;10,0) props={1=>value}")
|
||||
r.insert(RBA::Box::new(1, 2, 11, 22))
|
||||
assert_equal(r[0].to_s, "@@@")
|
||||
assert_equal(r[1].to_s, "(0,0;0,20;10,20;10,0) props={1=>value}")
|
||||
|
||||
r = RBA::Region::new(ly.begin_shapes(c1.cell_index, l2), "*")
|
||||
assert_equal(csort(r.to_s), csort("(-11,-21;-11,-19;-9,-19;-9,-21);(9,19;9,21;11,21;11,19);(-11,79;-11,81;-9,81;-9,79);(9,119;9,121;11,121;11,119);(189,79;189,81;191,81;191,79);(209,119;209,121;211,121;211,119)"))
|
||||
|
||||
Vendored
+6
-2
@@ -103,7 +103,7 @@ class DBTexts_TestClass < TestBase
|
||||
assert_equal(r.is_empty?, false)
|
||||
assert_equal(r.count, 1)
|
||||
assert_equal(r.hier_count, 1)
|
||||
assert_equal(r[0].to_s, "('uvw',r0 110,210)")
|
||||
assert_equal(r[0].to_s, "('uvw',r0 110,210) props={}")
|
||||
assert_equal(r[1].to_s, "")
|
||||
assert_equal(r.bbox.to_s, "(110,210;110,210)")
|
||||
|
||||
@@ -223,9 +223,13 @@ class DBTexts_TestClass < TestBase
|
||||
|
||||
r.flatten
|
||||
assert_equal(r.has_valid_texts?, true)
|
||||
assert_equal(r[1].to_s, "('abc',r0 100,-100)")
|
||||
assert_equal(r[1].to_s, "('abc',r0 100,-100) props={}")
|
||||
assert_equal(r[100].inspect, "nil")
|
||||
assert_equal(r.bbox.to_s, "(100,-200;300,-100)")
|
||||
|
||||
r = RBA::Texts::new
|
||||
r.insert(RBA::TextWithProperties::new(RBA::Text::new("string", RBA::Trans::new), { 1 => "value" }))
|
||||
assert_equal(r[0].to_s, "('string',r0 0,0) props={1=>value}")
|
||||
|
||||
dss = RBA::DeepShapeStore::new
|
||||
r = RBA::Texts::new(ly.begin_shapes(c1.cell_index, l1), dss)
|
||||
|
||||
Reference in New Issue
Block a user