worked on floorplan (v2)
worked on grid-generation (v2) new helper methods for geometry new test cases
This commit is contained in:
@@ -29,6 +29,10 @@ namespace Assert {
|
||||
if (v1 != v2) {doThrow(err);}
|
||||
}
|
||||
|
||||
template <typename T, typename STR> static inline void notEqual(const T v1, const T v2, const STR err) {
|
||||
if (v1 == v2) {doThrow(err);}
|
||||
}
|
||||
|
||||
template <typename T, typename STR> static inline void isTrue(const T v, const STR err) {
|
||||
if (!v) {doThrow(err);}
|
||||
}
|
||||
@@ -53,6 +57,10 @@ namespace Assert {
|
||||
if (v == 0) {doThrow(err);}
|
||||
}
|
||||
|
||||
template <typename T, typename STR> static inline void isNear(const T v1, const T v2, const T delta, const STR err) {
|
||||
if (std::abs(v1-v2) > delta) {doThrow(err);}
|
||||
}
|
||||
|
||||
template <typename T, typename STR> static inline void isBetween(const T v, const T min, const T max, const STR err) {
|
||||
if (v < min || v > max) {doThrow(err);}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user