You need to sign in or sign up before continuing.×
Ad
  • Custom User Avatar

    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.

  • Custom User Avatar

    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.

  • Custom User Avatar

    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.

  • Custom User Avatar

    I just tried a few solutions and saw no problem.

  • Custom User Avatar

    PHP: Looks like testSelfieRotRandom is broken, stack trace shows that it calls 'rot' function directly bypassing 'oper'. Caller is 'selfieAndRot32'???