Skip to content

Commit

Permalink
FTree: don't assume terminal condition for recursion
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexandreDubray committed Dec 8, 2020
1 parent 7480b09 commit 890c502
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions FTree/src/InginiousTests.java
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public void testSimpleMap() throws CustomGradingResult{

assertEquals(4960, fTreeSum(result) );

if(FTree.counter != 31){
if(FTree.counter < 2){
throw new CustomGradingResult(TestStatus.FAILED, 0, "Your map method must be recursive");
}

Expand Down Expand Up @@ -120,7 +120,7 @@ public void testRandomMap() throws CustomGradingResult{

assertEquals(elemSum*10, fTreeSum(result) );

if(FTree.counter != 31){
if(FTree.counter < 2){
throw new CustomGradingResult(TestStatus.FAILED, 0, "Your map method must be recursive");
}

Expand Down Expand Up @@ -157,7 +157,7 @@ public void testDepth() throws CustomGradingResult{

assertEquals(4, root.depth());

if(FTree.counter != 5){
if(FTree.counter < 2){
throw new CustomGradingResult(TestStatus.FAILED, 0, "Your map method must be recursive");
}

Expand Down

0 comments on commit 890c502

Please sign in to comment.