Describe(Sample_Tests) { It(Test) { Assert::That(calculator(420, 0, 420), Equals("Invalid Input!")); Assert::That(calculator( 1, '+', 1), Equals("2")); Assert::That(calculator( 16, '+',9), Equals("25")); Assert::That(calculator( 1, '-',1), Equals("0")); Assert::That(calculator( 57,'-', 62), Equals("-5")); Assert::That(calculator(-10,'*', 10), Equals("-100")); Assert::That(calculator(-12,'*', -13), Equals("156")); Assert::That(calculator( 2, '/',4), Equals("0")); Assert::That(calculator( 4, '/',2), Equals("2")); Assert::That(calculator( 1, '/',0), Equals("Invalid Input!")); Assert::That(calculator( 3, '%',5), Equals("3")); Assert::That(calculator( 5,'%', 3), Equals("2")); Assert::That(calculator(6, 69, 69), Equals("Invalid Input!")); } };
- Describe(Sample_Tests) {
- It(Test) {
- Assert::That(calculator(420, 0, 420), Equals("Invalid Input!"));
- Assert::That(calculator( 1, '+', 1), Equals("2"));
- Assert::That(calculator( 16, '+',9), Equals("25"));
- Assert::That(calculator( 1, '-',1), Equals("0"));
- Assert::That(calculator( 57,'-', 62), Equals("-5"));
- Assert::That(calculator(-10,'*', 10), Equals("-100"));
Assert::That(calculator(-12,'*', -12), Equals("144"));- Assert::That(calculator(-12,'*', -13), Equals("156"));
- Assert::That(calculator( 2, '/',4), Equals("0"));
- Assert::That(calculator( 4, '/',2), Equals("2"));
- Assert::That(calculator( 1, '/',0), Equals("Invalid Input!"));
- Assert::That(calculator( 3, '%',5), Equals("3"));
- Assert::That(calculator( 5,'%', 3), Equals("2"));
- Assert::That(calculator(6, 69, 69), Equals("Invalid Input!"));
- }
- };