Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
Take a look at the return statement for selfieAndRot32. It is banking on the rot function to accept string as a parameter. Then selfieAndRot32 is called to construct a proper solution in testSelfieRotRandom, which what was failing in my original solution.
Now that you solved it, look at the random tests and see how the function is called in
testSelfieRotRandom
. There is no bypass of oper.The problem is that selfieAndRot is called directly from tests bypassing oper function. My selfieAndRot takes in array as a parameter, expecting oper to do proper conversion, so when it is called directly with a string parameter, test fails. I figured it out looking into other languages translations with strong typed parameters. I think that the instructions should explicityly state what parameter type should be used for those functions.
I just tried a few solutions and saw no problem.
PHP: Looks like testSelfieRotRandom is broken, stack trace shows that it calls 'rot' function directly bypassing 'oper'. Caller is 'selfieAndRot32'???