Fixing unit tests for 64 bit coordinates

This commit is contained in:
Matthias Koefferlein 2024-01-04 00:33:21 +01:00
parent 303b4fe47f
commit 5e096bd433
1 changed files with 70 additions and 0 deletions

View File

@ -1730,6 +1730,41 @@ TEST(7)
"box (150,150;2150,1050) #12\n"
);
} else if (sizeof (db::ShortBox::coord_type) > 2) {
EXPECT_EQ (shapes_to_string (_this, copy),
"box (0,100;2000,1000) #0\n"
"box (100,200;2100,1100) #0\n"
"box (150,150;2150,1050) #0\n"
"box (50,-1050;1050,-50) #0\n"
"box (50,8950;1050,9950) #0\n"
"box (50,18950;1050,19950) #0\n"
"box (11050,-1050;12050,-50) #0\n"
"box (11050,8950;12050,9950) #0\n"
"box (11050,18950;12050,19950) #0\n"
"box (22050,-1050;23050,-50) #0\n"
"box (22050,8950;23050,9950) #0\n"
"box (22050,18950;23050,19950) #0\n"
"box (33050,-1050;34050,-50) #0\n"
"box (33050,8950;34050,9950) #0\n"
"box (33050,18950;34050,19950) #0\n"
"box (0,100;2000,1000) #10\n"
"box (100,200;2100,1100) #11\n"
"box (150,150;2150,1050) #12\n"
"box (50,-1050;1050,-50) #20\n"
"box (50,8950;1050,9950) #20\n"
"box (50,18950;1050,19950) #20\n"
"box (11050,-1050;12050,-50) #20\n"
"box (11050,8950;12050,9950) #20\n"
"box (11050,18950;12050,19950) #20\n"
"box (22050,-1050;23050,-50) #20\n"
"box (22050,8950;23050,9950) #20\n"
"box (22050,18950;23050,19950) #20\n"
"box (33050,-1050;34050,-50) #20\n"
"box (33050,8950;34050,9950) #20\n"
"box (33050,18950;34050,19950) #20\n"
);
} else {
EXPECT_EQ (shapes_to_string (_this, copy),
@ -1808,6 +1843,41 @@ TEST(7)
"box (150,150;2150,1050) #12\n"
);
} else if (sizeof (db::ShortBox::coord_type) > 2) {
EXPECT_EQ (shapes_to_string (_this, sa_copy),
"box (0,100;2000,1000) #0\n"
"box (100,200;2100,1100) #0\n"
"box (150,150;2150,1050) #0\n"
"box (50,-1050;1050,-50) #0\n"
"box (50,8950;1050,9950) #0\n"
"box (50,18950;1050,19950) #0\n"
"box (11050,-1050;12050,-50) #0\n"
"box (11050,8950;12050,9950) #0\n"
"box (11050,18950;12050,19950) #0\n"
"box (22050,-1050;23050,-50) #0\n"
"box (22050,8950;23050,9950) #0\n"
"box (22050,18950;23050,19950) #0\n"
"box (33050,-1050;34050,-50) #0\n"
"box (33050,8950;34050,9950) #0\n"
"box (33050,18950;34050,19950) #0\n"
"box (0,100;2000,1000) #10\n"
"box (100,200;2100,1100) #11\n"
"box (150,150;2150,1050) #12\n"
"box (50,-1050;1050,-50) #20\n"
"box (50,8950;1050,9950) #20\n"
"box (50,18950;1050,19950) #20\n"
"box (11050,-1050;12050,-50) #20\n"
"box (11050,8950;12050,9950) #20\n"
"box (11050,18950;12050,19950) #20\n"
"box (22050,-1050;23050,-50) #20\n"
"box (22050,8950;23050,9950) #20\n"
"box (22050,18950;23050,19950) #20\n"
"box (33050,-1050;34050,-50) #20\n"
"box (33050,8950;34050,9950) #20\n"
"box (33050,18950;34050,19950) #20\n"
);
} else {
EXPECT_EQ (shapes_to_string (_this, sa_copy),