unitTest.cpp 475 B

12345678910
  1. Describe(basic_tests)
  2. {
  3. It(test1){Assert::That(calculator(2, '/', 2), Equals(1));}
  4. It(test2){Assert::That(calculator(10, '-', 7), Equals(3));}
  5. It(test3){Assert::That(calculator(2, '*', 16), Equals(32));}
  6. It(test4){Assert::That(calculator(2, '-', 2), Equals(0));}
  7. It(test5){Assert::That(calculator(15, '+', 26), Equals(41));}
  8. It(test6){Assert::That(calculator(2, '+', 2), Equals(4));}
  9. It(test7){Assert::That(calculator(2, '/', 0), Equals(0));} // Can't divide by 0!
  10. };