exercism / java-test-runner

GNU Affero General Public License v3.0
9 stars 13 forks source link

Test says it failed when it passed all tests on local machine #42

Closed guykogan1995 closed 11 months ago

guykogan1995 commented 2 years ago

https://exercism.org/tracks/java/exercises/scrabble-score

The passing code on local machine fails on excercism test checker:

class Scrabble { private int sum = 0; Scrabble(String word) { if(word == null) { return; } for(int i = 0; i < word.length(); i++) { switch(word.toLowerCase().charAt(i)) { case 'a','e','i','o','u','l','n','r','s','t': sum += 1; break; case 'd','g': sum += 2; break; case 'b','c','m', 'p': sum += 3; break; case 'f', 'h', 'v', 'w', 'y': sum += 4; break; case 'k': sum += 5; break; case 'j', 'x': sum += 8; break; case 'q', 'z': sum += 10; break; default: sum = 0; break; } } } int getScore() { return sum; } }

jmrunkle commented 2 years ago

The passing code on local machine fails on excercism test checker

What is the failure?

sanderploegsma commented 11 months ago

Closing this issue as there was no follow-up.