unitTest.cpp 484 B

1234567891011121314
  1. Describe(countdown_tests)
  2. {
  3. It(should_count_down_correctly)
  4. {
  5. Assert::That(countdown(3), Equals(std::vector<int>{3, 2, 1, 0}));
  6. Assert::That(countdown(20), Equals(std::vector<int>{20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0}));
  7. }
  8. It(should_count_down_with_one_number) {
  9. Assert::That(countdown(1), Equals(std::vector<int>{1, 0}));
  10. }
  11. It(should_count_down_with_zero_numbers) {
  12. Assert::That(countdown(0), Equals(std::vector<int>{0}));
  13. }
  14. };