Position.cpp 292 B

12345678910111213141516
  1. #include <catch2/catch_test_macros.hpp>
  2. #include <Snake/Position.hpp>
  3. TEST_CASE("Equality opearator test", "[Position]")
  4. {
  5. Position p1 = {0, 0};
  6. Position p2 = {0, 0};
  7. Position p3 = {1, 0};
  8. Position p4 = {0, 1};
  9. REQUIRE(p1 == p2);
  10. REQUIRE_FALSE(p2 == p3);
  11. REQUIRE_FALSE(p3 == p4);
  12. }