diff --git a/src/db/unit_tests/dbLayoutUtilsTests.cc b/src/db/unit_tests/dbLayoutUtilsTests.cc index ce0a352c2..24d95c441 100644 --- a/src/db/unit_tests/dbLayoutUtilsTests.cc +++ b/src/db/unit_tests/dbLayoutUtilsTests.cc @@ -779,3 +779,42 @@ TEST(20_scale_and_snap) db::compare_layouts (_this, l1, tl::testdata () + "/algo/layout_utils_au_sns4.oas", db::NormalizationMode (db::WriteOAS + db::WithArrays)); } + +TEST(21_break1) +{ + db::Layout l1; + { + std::string fn (tl::testdata ()); + fn += "/algo/break_polygons_test.gds"; + tl::InputStream stream (fn); + db::Reader reader (stream); + reader.read (l1); + } + + db::break_polygons (l1, 10, 3.0); + + CHECKPOINT(); + db::compare_layouts (_this, l1, tl::testdata () + "/algo/layout_utils_au_bp1.gds"); +} + +TEST(22_break2) +{ + db::Layout l1; + { + std::string fn (tl::testdata ()); + fn += "/algo/break_polygons_test.gds"; + tl::InputStream stream (fn); + db::Reader reader (stream); + reader.read (l1); + } + + unsigned int li1 = find_layer (l1, 1, 0); + unsigned int li2 = find_layer (l1, 2, 0); + + db::break_polygons (l1, li1, 10, 0.0); + db::break_polygons (l1, li2, 0, 3.0); + + CHECKPOINT(); + db::compare_layouts (_this, l1, tl::testdata () + "/algo/layout_utils_au_bp2.gds"); +} + diff --git a/testdata/algo/break_polygons_test.gds b/testdata/algo/break_polygons_test.gds new file mode 100644 index 000000000..089d24e17 Binary files /dev/null and b/testdata/algo/break_polygons_test.gds differ diff --git a/testdata/algo/layout_utils_au_bp1.gds b/testdata/algo/layout_utils_au_bp1.gds new file mode 100644 index 000000000..c66a1daf6 Binary files /dev/null and b/testdata/algo/layout_utils_au_bp1.gds differ diff --git a/testdata/algo/layout_utils_au_bp2.gds b/testdata/algo/layout_utils_au_bp2.gds new file mode 100644 index 000000000..aacb20a86 Binary files /dev/null and b/testdata/algo/layout_utils_au_bp2.gds differ