Test failure (tests/hbltests/UnitTests/HBLCommands/Eval.bf)
Hi,
When updating the FreeBSD package to 2.5.88, a test failed. Please let me know if any additional information would be helpful.
root@15amd64-default:/usr/ports/biology/hyphy # cd /wrkdirs/usr/ports/biology/hyphy/work/hyphy-2.5.88 && /usr/local/bin/ctest --rerun-failed --output-on-failure
Test project /wrkdirs/usr/ports/biology/hyphy/work/hyphy-2.5.88
Start 1: UNIT-TESTS
1/1 Test #1: UNIT-TESTS .......................***Failed 1.07 sec
./tests/hbltests/UnitTests/HBLCommands/Abs.bf
./tests/hbltests/UnitTests/HBLCommands/Add.bf
...
...
...
./tests/hbltests/UnitTests/HBLCommands/libv3_utilityfunctions.bf
./tests/hbltests/UnitTests/HBLCommands/namespace.bf
\n\n------------------------SUMMARY (Failed Tests)----------------------------\n
\n The following tests failed:
./tests/hbltests/UnitTests/HBLCommands/Eval.bf
\n The output of the failed tests is below: \n
--------------------------------------------------------------
[Running COVERAGE TEST 'Eval']
## ASSERTION FAILED
Failed to evaluate a function with exponents
[TEST FAILED]
\n
\n\n------------------------SUMMARY (Failed Tests)----------------------------\n
Dear @Jehops,
Odd. I can replicate this behavior on OS X or Rocky Linux. Would you be able to do the following
$hyphy -c
Eval("3^3+2")
[number]
exit
And report what the [number] is?
Best, Sergei
Hi Dr. Pond,
Here is the output:
root@15amd64-default:/usr/ports/biology/hyphy # hyphy -c
HYPHY is running in calculator mode. Type 'exit' when you are finished.
Eval("3^3+2")
28.99999999999999
By the way, I guessed the way to exit the calculator was Ctrl+d, but that caused an infinite loop that printed null.
Dear @Jehops,
Thanks! I'll adjust the calculator mode and the test to better account for rounding errors (it should already be doing that, but looks like not robustly).
Best, Sergei
Dear @Jehops,
Should be better in 2.5.89 (along with the correct handling of EOF in the caculator mode, i.e. Ctrl-d).
Best, Sergei