unitTest.cpp 369 B

12345678910
  1. Describe(basic_tests) {
  2. It(test1){Assert::That(squared(10), Equals(100));}
  3. It(test2){Assert::That(squared(69), Equals(4761));}
  4. It(test3){Assert::That(squared(666), Equals(443556));}
  5. It(test4){Assert::That(squared(-21), Equals(441));}
  6. It(test5){Assert::That(squared(21), Equals(441));}
  7. };
  8. // This proves that the square root of
  9. // a negative number isn't possible!