Pouncer
Jul 18th, 2008, 04:05 AM
class GamePlayer {
int doSomeMove() {
// for loop put in here deliberately to cause timeout
for (;;) {
}
return 5;
}
}
i'm trying to test my system with timeouts and stuff, by doing malicious coding on purpose. but the above doesn't work anyway as it says
Test.java:40: unreachable statement
return 5;
^
1 error
how could i make this work to test stuff?
int doSomeMove() {
// for loop put in here deliberately to cause timeout
for (;;) {
}
return 5;
}
}
i'm trying to test my system with timeouts and stuff, by doing malicious coding on purpose. but the above doesn't work anyway as it says
Test.java:40: unreachable statement
return 5;
^
1 error
how could i make this work to test stuff?