Skip to content

Commit

Permalink
Fixed #13, test: added test for multiplicationUsingLoopWithStringInpu…
Browse files Browse the repository at this point in the history
…t where input is zero, also added requirements comments
  • Loading branch information
mnordste committed Feb 23, 2022
1 parent e882d1c commit 8cc97b6
Showing 1 changed file with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -159,10 +159,20 @@ public void multiplication() {
public void testMultiplicationUsingFFTZero(){
long result = Integer.parseInt(Multiplication.multiplyUsingFFT("0", "0"));
long expected = 0;

//Requirement:
//When multiplying two values where one or both is zero the result should be zero
assertTrue(result == expected);
}

@Test
public void testMultiplyUsingLoopsWithStringInputZero(){
long result = Integer.parseInt(Multiplication.multiplyUsingLoopWithStringInput("0", "0"));
long expected = 0;
//Requirement:
//When multiplying two values where one or both is zero the result should be zero
assertTrue(result ==expected);
}

@Test
public void division() {
int a = nextRandomInt(MIN, MAX);
Expand Down

0 comments on commit 8cc97b6

Please sign in to comment.