unitTest.cpp 490 B

123456789101112131415161718
  1. Describe(empty_string_validation)
  2. {
  3. It(should_return_true)
  4. {
  5. Assert::That(isEmpty(""), Equals(true));
  6. }
  7. It(should_return_false_even_for_strings_with_only_white_spaces)
  8. {
  9. Assert::That(isEmpty(" "), Equals(false));
  10. Assert::That(isEmpty(" "), Equals(false));
  11. }
  12. It(should_return_false_for_all_other_strings)
  13. {
  14. Assert::That(isEmpty("38215"), Equals(false));
  15. Assert::That(isEmpty("afjabsdf"), Equals(false));
  16. Assert::That(isEmpty("!?@&"), Equals(false));
  17. }
  18. };