7 kyu
Create new programming mechanism to add numbers
196Ankit-rana
Loading description...
Metaprogramming
Fundamentals
View
This comment has been reported as {{ abuseKindText }}.
Show
This comment has been hidden. You can view it now .
This comment can not be viewed.
- |
- Reply
- Edit
- View Solution
- Expand 1 Reply Expand {{ comments?.length }} replies
- Collapse
- Spoiler
- Remove
- Remove comment & replies
- Report
{{ fetchSolutionsError }}
-
-
Your rendered github-flavored markdown will appear here.
-
Label this discussion...
-
No Label
Keep the comment unlabeled if none of the below applies.
-
Issue
Use the issue label when reporting problems with the kata.
Be sure to explain the problem clearly and include the steps to reproduce. -
Suggestion
Use the suggestion label if you have feedback on how this kata can be improved.
-
Question
Use the question label if you have questions and/or need help solving the kata.
Don't forget to mention the language you're using, and mark as having spoiler if you include your solution.
-
No Label
- Cancel
Commenting is not allowed on this discussion
You cannot view this solution
There is no solution to show
Please sign in or sign up to leave a comment.
How about some tests to make sure solutions aren't hardcoded based on error messages? Something like
Added two test cases without values in error messages
This comment has been hidden.
I can see the problem now but i am afraid i have no ideas of how to stop this problem. Please suggest me if we have standard way of avoiding this problem in codewars. Thanks in advance.
I suggested 2 instances of
add![x, y]
with different values ofx
andy
at runtime. Of course, that would still be hardcodable, but just a bit less straightforward...added two instance of add![x, y]
The default sample tests are confusing because they have a different idea of
add
.Thanks for pointing that out. I have just added a Example test case for clarification.