weak test cases for cw5 Chess Master Codewars 2014

The test cases for the problem Chess Master(cw5) of Codewars are weak. when i read the question i was wondering the question required a careful analysis but on seeing a high number of accepted answers I ran some of the accepted codes and found incorrect output for some test cases . Here’s one example of a code that has been accepted. http://www.codechef.com/viewsolution/5056701

And here’s a test case for which the answer should be ‘NOT YET!’ but is instead ‘CHECKMATE!’ !

(writing ‘x’ instead of underscore ‘_’)

x x x x x x x x

x x x x x x x x

x x x B R x x x

x x P x S x x x

x Q x x x x x x

x x x x x x x x

x x x x x x x x

x x x x x x x x

Moving one step up would be a safe position and hence answer should be ‘NOT YET!’.

The question states all rules of Chess Apply here !

3 Likes

I simply printed “NOT YET!” for this question and got an AC. Very very weak test cases indeed!
http://www.codechef.com/viewsolution/5067024