| 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") |
| 303 | on_cell_in_a_only C2 |
| 304 | on_cell_in_b_only C2X |
| 305 | on_begin_cell C1 C1 |
| 306 | on_begin_inst_differences |
| 307 | on_end_inst_differences |
| 308 | on_begin_layer 1/0:1/0 1/0:0 |
| 309 | on_end_layer |
| 310 | on_end_cell |
| 311 | END |
| 312 | |
| 313 | res = compare(a.top_cell, b.top_cell, RBA::LayoutDiff::Verbose + RBA::LayoutDiff::SmartCellMapping) |
| 314 | assert_equal(res, <<"END") |
| 315 | on_cell_name_differs C2 C2X |
| 316 | on_begin_cell C1 C1 |
| 317 | on_begin_layer 1/0:1/0 1/0:0 |
| 318 | on_end_layer |
| 319 | on_end_cell |
| 320 | on_begin_cell C2 C2X |
| 321 | on_begin_layer 1/0:1/0 1/0:0 |
| 322 | on_end_layer |
| 323 | on_end_cell |
| 324 | END |
| 325 | |
| 326 | end |
| 327 | |
| 328 | end |
| 329 |
nothing calls this directly
no test coverage detected