| 90 | end |
| 91 | |
| 92 | def test_2 |
| 93 | |
| 94 | a = RBA::Layout::new |
| 95 | l1a = a.layer(1, 0) |
| 96 | c1a = a.create_cell("C1") |
| 97 | c1a.shapes(l1a).insert(RBA::Box::new(0, 0, 1000, 1000)) |
| 98 | |
| 99 | b = RBA::Layout::new |
| 100 | l1b = b.layer(1, 0) |
| 101 | l2b = b.layer(2, 0) |
| 102 | c1b = b.create_cell("C1") |
| 103 | c2b = b.create_cell("C2") |
| 104 | c1b.shapes(l1b).insert(RBA::Box::new(1, 0, 1000, 1001)) |
| 105 | c1b.shapes(l1b).insert(RBA::Edge::new(1, 0, 1000, 1001)) |
| 106 | c1b.shapes(l1b).insert(RBA::Polygon::new(RBA::Box::new(1, 0, 1000, 1001))) |
| 107 | c1b.shapes(l1b).insert(RBA::Path::new([RBA::Point::new(1, 0), RBA::Point::new(1000, 1001)], 0)) |
| 108 | c1b.shapes(l1b).insert(RBA::Text::new("abc", RBA::Trans::new(1, 0))) |
| 109 | |
| 110 | res = compare(a, b) |
| 111 | assert_equal(res, <<"END") |
| 112 | on_layer_in_b_only 2/0 |
| 113 | on_cell_in_b_only C2 |
| 114 | on_begin_cell C1 C1 |
| 115 | on_begin_layer 1/0:1/0 1/0:0 |
| 116 | on_begin_polygon_differences |
| 117 | polygon_in_b_only (1,0;1,1001;1000,1001;1000,0) |
| 118 | on_end_polygon_differences |
| 119 | on_begin_path_differences |
| 120 | path_in_b_only (1,0;1000,1001) w=0 bx=0 ex=0 r=false |
| 121 | on_end_path_differences |
| 122 | on_begin_text_differences |
| 123 | text_in_b_only ('abc',r0 1,0) |
| 124 | on_end_text_differences |
| 125 | on_begin_box_differences |
| 126 | box_in_a_only (0,0;1000,1000) |
| 127 | box_in_b_only (1,0;1000,1001) |
| 128 | on_end_box_differences |
| 129 | on_begin_edge_differences |
| 130 | edge_in_b_only (1,0;1000,1001) |
| 131 | on_end_edge_differences |
| 132 | on_end_layer |
| 133 | on_end_cell |
| 134 | END |
| 135 | |
| 136 | res = compare(b, a) |
| 137 | assert_equal(res, <<"END") |
| 138 | on_layer_in_a_only 2/0 |
| 139 | on_cell_in_a_only C2 |
| 140 | on_begin_cell C1 C1 |
| 141 | on_begin_layer 1/0:1/0 1/0:0 |
| 142 | on_begin_polygon_differences |
| 143 | polygon_in_a_only (1,0;1,1001;1000,1001;1000,0) |
| 144 | on_end_polygon_differences |
| 145 | on_begin_path_differences |
| 146 | path_in_a_only (1,0;1000,1001) w=0 bx=0 ex=0 r=false |
| 147 | on_end_path_differences |
| 148 | on_begin_text_differences |
| 149 | text_in_a_only ('abc',r0 1,0) |
nothing calls this directly
no test coverage detected