| 266 | end |
| 267 | |
| 268 | def test_8_file_based_library |
| 269 | |
| 270 | # clean up before |
| 271 | [ "RBA-unit-test" ].each do |name| |
| 272 | l = RBA::Library::library_by_name(name) |
| 273 | l && l.unregister |
| 274 | end |
| 275 | |
| 276 | lylib = RBA::Layout::new |
| 277 | lylib.read(File.join($ut_testsrc, "testdata", "gds", "lib_a.gds")) |
| 278 | |
| 279 | tmp = File::join($ut_testtmp, "rba_dbLibrary_8.gds") |
| 280 | lylib.write(tmp) |
| 281 | |
| 282 | lib = RBA::Library::library_from_file(tmp, "RBA-unit-test") |
| 283 | |
| 284 | ly = RBA::Layout::new |
| 285 | top = ly.create_cell("TOP") |
| 286 | a = ly.create_cell("A", "RBA-unit-test") |
| 287 | top.insert(RBA::CellInstArray::new(a, RBA::Trans::new)) |
| 288 | |
| 289 | assert_equal(top.dbbox.to_s, "(0,0;2,2)") |
| 290 | |
| 291 | lylib.clear |
| 292 | lylib.read(File.join($ut_testsrc, "testdata", "gds", "lib_b.gds")) |
| 293 | lylib.write(tmp) |
| 294 | |
| 295 | lib.refresh |
| 296 | |
| 297 | assert_equal(top.dbbox.to_s, "(-1,-1;1,1)") |
| 298 | |
| 299 | end |
| 300 | |
| 301 | def test_9_file_based_library_multiple_files |
| 302 |
nothing calls this directly
no test coverage detected