Added some more unit tests.

This commit is contained in:
Matthias Koefferlein 2017-02-15 01:15:47 +01:00
parent 320e96f6da
commit 8c4013c500
1 changed files with 5 additions and 0 deletions

View File

@ -447,6 +447,8 @@ TEST(3)
EXPECT_EQ (x, "[$3](1000,-500;2000,500)/[$3](1000,1500;2000,2500)/[$3](4000,500;5000,1500)/[$3](4000,2500;5000,3500)/[$3](1000,5500;2000,6500)/[$3](1000,7500;2000,8500)/[$3](4000,6500;5000,7500)/[$3](4000,8500;5000,9500)/[$3](7000,-500;8000,500)/[$3](7000,1500;8000,2500)/[$3](10000,500;11000,1500)/[$3](10000,2500;11000,3500)/[$3](7000,5500;8000,6500)/[$3](7000,7500;8000,8500)/[$3](10000,6500;11000,7500)/[$3](10000,8500;11000,9500)");
db::RecursiveShapeIterator i2 (g, c0, 0, db::Region (db::Box (3400, 3450, 5600, 6500)));
EXPECT_EQ (i2.has_complex_region (), false);
EXPECT_EQ (i2.region ().to_string (), "(3400,3450;5600,6500)");
x = collect(i2, g);
EXPECT_EQ (x, "[$3](4000,2500;5000,3500)/[$3](4000,6500;5000,7500)");
@ -475,6 +477,9 @@ TEST(3)
rro.insert (db::Box (6650, 5300, 10000, 7850));
db::RecursiveShapeIterator i23o (g, c0, 0, rro, true);
EXPECT_EQ (i23o.has_complex_region (), true);
EXPECT_EQ (i23o.complex_region ().to_string (), "(3400,3450;3400,6500;5600,6500;5600,3450);(6650,5300;6650,7850;10000,7850;10000,5300)");
db::RecursiveShapeIterator i23ocopy = i23o;
x = collect(i23o, g);