mfgnik

Untitled

Jan 19th, 2021
749
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2. TEST_CASE("Simple") {
  3.     {
  4.         std::vector<int> expected{0, 1};
  5.         REQUIRE(expected == Range(0, 2, 1));
  6.     }
  7.     {
  8.         std::vector<int> expected{2, 3, 4};
  9.         REQUIRE(expected == Range(2, 5, 1));
  10.     }
  11.     {
  12.         std::vector<int> expected{1, 3};
  13.         REQUIRE(expected == Range(1, 5, 2));
  14.     }
  15.     {
  16.         std::vector<int> expected{-9, -4, 1, 6};
  17.         REQUIRE(expected == Range(-9, 10, 5));
  18.     }
  19. }
  20.  
  21. TEST_CASE("SimpleReverse") {
  22.     {
  23.         std::vector<int> expected{5, 4, 3};
  24.         REQUIRE(expected == Range(5, 2, -1));
  25.     }
  26.     {
  27.         std::vector<int> expected{5, 3};
  28.         REQUIRE(expected == Range(5, 1, -2));
  29.     }
  30.     {
  31.         std::vector<int> expected{7};
  32.         REQUIRE(expected == Range(7, 6, -3));
  33.     }
  34. }
RAW Paste Data