[core] Tighten geo.hpp ctors

This commit is contained in:
Bruno de Oliveira Abinader
2017-04-11 17:07:25 +03:00
committed by John Firebaugh
parent 8877452ec3
commit 2f4d162deb
12 changed files with 171 additions and 75 deletions

View File

@@ -471,14 +471,12 @@ TEST(Transform, DefaultTransform) {
// Cannot assign invalid sizes.
std::vector<Size> invalidSizes = { {}, { min, max }, { max, min } };
for (const Size& size : invalidSizes) {
ASSERT_TRUE(size.isEmpty());
bool pass = false;
try {
transform.resize(size);
ASSERT_TRUE(false) << "Should throw";
} catch (...) {
pass = true;
ASSERT_TRUE(size.isEmpty());
}
ASSERT_TRUE(pass) << "Expected to throw";
}
Size validSize { max, max };