-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Perl Unit test when expecting "False/0" output #66
Comments
Probably better to generate custom equality checking code when the expected output is |
What type of error is this:
Here is an argument for the latter: this is what the |
I think the comparison should be relaxed. It looks like "numeric false" (
https://perldoc.perl.org/perldata#Scalar-values Some answers on StackOverflow recommended |
It seems like Perl's $ perl -e 'print((0== "") . "\n"); print(!!0 == "") ."\n"); print((1 == "") . "\n")'
1
1
Maybe we can say |
I have a feeling that this may have been debated but testing boolean values in Perl may need improvement
Example:
HumanEval_92_any_int
It seems like at the moment, when the program is expected to output
False
, it is being compared against""
witheq_deeply
. Many generations in perl, though, return 0/1. But the following comparison between0
and""
seem to evaluate to FalseMaybe, one solution is to directly use the output of these functions as the condition for the
if
statement for that unit test (only when output is expected to be boolean)The text was updated successfully, but these errors were encountered: