Earn extra honor and gain new allies!
Honor is earned for each new codewarrior who joins.
Learn more
  • This comment is hidden because it contains spoiler information about the solution

  • Will try and figure out what is wrong with these test scenarios.
    Note: I added some other special cases where parsing generated /* */ causes erroneous behaviour, that might be the issue with some random tests.

    This is also outlined in the description but since you have pointed out another case, I will be adjusting it accordingly if necessary.

    If you have something else in mind, please feel free to point it out.

  • Input: 000000fecum0000xt1l00041bi5
    Expected: '262413', instead got: '0'
    
    Input: 00i03ea000e43bn000000pfglo
    Expected: '9175043', instead got: '43000003'
    
    Input: 0000ouuq000000xoms000gx42i
    Expected: '34', instead got: '0'
    
    Input: 0kxdxw000007xteo0000i1tb
    Expected: '229377', instead got: '700001'
    

    The expected values above seem incorrect.

    Far too much is not explained; the description needs a lot more work.

  • Thanks for the info, should be useful in other golf-kata.

  • You have to read the solution file using Node (IIRC both readFile and readFileSync should work).

  • What would you suggest for characters checking, in case you need to do golfing?

    Note: This is a first attempt in cg so it could have some issues at some point.

  • This comment is hidden because it contains spoiler information about the solution

  • Changed the kata description to include more details for error in input.

  • Some phrasing and grammar errors fixed, more detail added to explain the bits diagram.

  • I have already set up Node 10 test cases even though I still don't see any errors in the randomized cases when any random test case is set up to fail.

    How can I confirm that the random cases are generated? (still exceptions might be shown but no gen. cases)

    This is resolved for now..

  • So, if any of the random asserts fails, only then it will print out the failed attempts.

    Didn't know that, will re-test it and re-set it up for node 10 as well. Note: Using babel with node 8 fails up to a point so keep that in mind as well.

    Thanks for the info.

  • but the main issue is that the randomized test cases are not generated at all with the current changes

    Node 10 uses Chai which, IIRC, follows the convention of NUnit and the likes: only prints test status upon first failure inside a it block or eventual success at the end of a it block. So the tests are being run, it's just that individual successful assertions aren't printed.

  • The problem is you haven't specified what is considered error input in the kata (and more importantly, what is tested).

    Input validation only makes sense if the input domain is known. Otherwise it's an endless defense ;-)

  • Just making sure the kata includes any relevant input scenarios (including validations).

    If it does not make it any more challenging will remove the validation.

  • If the intention of the Description is to explain the task as badly as possible, it worked.

    If the Description is intended to actually specify the task, it could do with a major rewrite.

  • Loading more items...