MCPcopy Create free account
hub / github.com/KLayout/klayout / test_6

Method test_6

testdata/ruby/dbLayoutDiff.rb:285–326  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

283 end
284
285 def test_6
286
287 a = RBA::Layout::new
288 l1a = a.layer(1, 0)
289 c1a = a.create_cell("C1")
290 c2a = a.create_cell("C2")
291 c2a.shapes(l1a).insert(RBA::Box::new(0, 0, 100, 100))
292 c1a.insert(RBA::CellInstArray::new(c2a.cell_index, RBA::Trans::new(10, 20)))
293
294 b = RBA::Layout::new
295 l1b = b.layer(1, 0)
296 c1b = b.create_cell("C1")
297 c2b = b.create_cell("C2X")
298 c2b.shapes(l1b).insert(RBA::Box::new(0, 0, 100, 100))
299 c1b.insert(RBA::CellInstArray::new(c2b.cell_index, RBA::Trans::new(10, 20)))
300
301 res = compare(a.top_cell, b.top_cell, 0)
302 assert_equal(res, <<"END")
303on_cell_in_a_only C2
304on_cell_in_b_only C2X
305on_begin_cell C1 C1
306on_begin_inst_differences
307on_end_inst_differences
308on_begin_layer 1/0:1/0 1/0:0
309on_end_layer
310on_end_cell
311END
312
313 res = compare(a.top_cell, b.top_cell, RBA::LayoutDiff::Verbose + RBA::LayoutDiff::SmartCellMapping)
314 assert_equal(res, <<"END")
315on_cell_name_differs C2 C2X
316on_begin_cell C1 C1
317on_begin_layer 1/0:1/0 1/0:0
318on_end_layer
319on_end_cell
320on_begin_cell C2 C2X
321on_begin_layer 1/0:1/0 1/0:0
322on_end_layer
323on_end_cell
324END
325
326 end
327
328end
329

Callers

nothing calls this directly

Calls 5

compareFunction · 0.70
layerMethod · 0.45
create_cellMethod · 0.45
insertMethod · 0.45
cell_indexMethod · 0.45

Tested by

no test coverage detected