Restrict use of functions in a kata #2703
-
When writing a kata there are often two options available for solving it:
I want the user to gain a deeper understanding of a subject when solving the kata. In order to do that the user should use, for example, bitwise operators. The user could also use a built-in function that solves the entire kata in one line, but still have no idea how it works under the hood. My question is (specifically for the C language), is there a way to prohibit the use of:
Thanks in advance. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
https://docs.codewars.com/authoring/guidelines/submission-tests/#tests-with-additional-restrictions Note: I don't do C myself, so I cannot tell anything more... |
Beta Was this translation helpful? Give feedback.
-
You can disable a C function by writing a dummy function with the same name in |
Beta Was this translation helpful? Give feedback.
You can disable a C function by writing a dummy function with the same name in
setup.c
(preloaded) orfixture.c
(tests)Be careful since most
math.h
functions exist in 3 flavors forfloat
('f' suffix),double
(no suffix) and long double ('l' suffix) e.g.powf(), pow(), powl()
Disabling a header is not very useful, since undeclared functions just emit a warning, and user can just copy-paste the declarations they need anyway.