Ad
  • Custom User Avatar

    Wow so many ways to get around...

    Anyway I'm resolving this issue since I've put the restriction in thanks everyone.

  • Custom User Avatar

    Makes sense. I've added the restriction. Out of curiousity though, how would one bring back the functions?

  • Custom User Avatar

    @matt But restricting the string value would restrict people from using the string everywhere whereas I'm only trying to restrict the usage of the functions right? Is there any advantage of restricting the string over overriding?

    @Voile Good catch there, I would never have thought of that

  • Custom User Avatar

    Wow I didn't know about the Function constructor thanks. Learn something new everyday.

    I've overridden eval and Function, would that be enough to restrict? Also, are there any other workarounds besides these two?

    I'm actually wondering how far someone would go to bypass such restrictions just for the sake of not doing the problem.

  • Custom User Avatar

    Wow thanks for catching that, I thought I was just that lucky/unlucky to keep getting strings with characters a-j.

  • Custom User Avatar

    Oh haha I missed that, I just used the same format from the example Test.expects. It's different probably because of the testing framework used for each language right?

  • Custom User Avatar

    Ah okay I got it. Let me try adding some.
    Edit: I've added some tests for randomly generated strings, is that what you meant?

  • Custom User Avatar

    I'm not sure I understand. Do you mean to write more tests apart from the current 4? Or to use more items in the test cases?

  • Custom User Avatar

    I've replaced all Test.expect to Test.assertEquals thanks!

  • Custom User Avatar

    What kind of random tests are you thinking of? I was trying to just focus on the grouping part instead of validation.

  • Custom User Avatar

    What should be used instead of Test.expect?

  • Custom User Avatar

    Ah so sorry thanks for helping to fix it @Johan