unitTest.cpp 482 B

1234567891011121314151617181920212223
  1. Describe(christmas_tree_tests)
  2. {
  3. It(test1){Assert::That(tree(1), Equals(std::vector<std::string>({"#"})));}
  4. It(test2) {
  5. Assert::That(tree(2), Equals(std::vector<std::string>({
  6. " # ",
  7. "###"
  8. })));
  9. }
  10. It(test3) {
  11. Assert::That(tree(5), Equals(std::vector<std::string>({
  12. " # ",
  13. " ### ",
  14. " ##### ",
  15. " ####### ",
  16. "#########"
  17. })));
  18. }
  19. It(should_work_for_a_tree_of_height_zero){Assert::That(tree(0), Equals(std::vector<std::string>({})));}
  20. };