20 lines
489 B
C++
20 lines
489 B
C++
#define CATCH_CONFIG_MAIN // This tells Catch to provide a main() - only do this
|
|
// in one cpp file
|
|
#include "Point.h"
|
|
#include "catch2.hpp"
|
|
#include "shapes.h"
|
|
|
|
|
|
TEST_CASE("Points are created correctly", "[POINT]") {
|
|
// SECTION("NORMAL operation") {
|
|
Point test{5, 6};
|
|
REQUIRE(test.x == 5);
|
|
REQUIRE(test.y == 6);
|
|
// }
|
|
// SECTION("not normal operation") {
|
|
// Point test{};
|
|
// REQUIRE(test.x == 0);
|
|
// REQUIRE(test.y == 0);
|
|
// }
|
|
}
|