unitTest.cpp 445 B

123456789
  1. Describe(find_unique_number)
  2. {
  3. It(test1){Assert::That(unique({3, 3, 3, 7, 3, 3}), Equals(7));}
  4. It(test2){Assert::That(unique({0, 0, 0.77, 0, 0}), Equals(0.77));}
  5. It(test3){Assert::That(unique({0, 1, 1, 1, 1, 1, 1, 1}), Equals(0));}
  6. It(test4){Assert::That(unique({-4, -4, -4, 4}), Equals(4));}
  7. It(test5){Assert::That(unique({8, 8, 8, 8, 8, 8, 8, 0.5}), Equals(0.5));}
  8. It(test6){Assert::That(unique({2, 1, 2, 2, 2, 2, 2, 2}), Equals(1));}
  9. };