Add unit testing of fdlibm
The project is relying on a variant of fdlibm, which has aleady been edited but never verified for correctness. This patch adds unit testing of fdlibm by: * introducing a test generator that uses a trusted libm implementation to calculate correct and expected results of math functions (tools/gen-test-fdlibm.sh and tools/unit-tests/gen-test-fdlibm.c), * adding tests created with the generator that stress all publicly exported functions of jerry's fdlibm (tests/unit/test-fdlibm.inc.h), and * adding a unit test file to drive the generated tests (tests/unit/test-fdlibm.c). Note: The test generator is not expected to be executed often, thus it is not wired into the build system. If it gets edited, it must be used locally to re-generate the .inc.h file. During development, it turned out that tests/unit/test-common.h included the system header math.h, which was only a bad smell until now but became a real header conflict issue with the introduction of the fdlibm unit test. Thus, this patch also changes the include to fdlibm-math.h. JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
operatorEqVarError
|
||||
noConstructor
|
||||
duplicateExpression
|
||||
wrongmathcall:tests/unit/test-fdlibm.inc.h
|
||||
|
||||
// FIXME: false positive in cppcheck 1.61 (will disappear once distro ships with 1.69)
|
||||
variableScope:jerry-core/ecma/builtin-objects/ecma-builtin-helpers.c
|
||||
|
||||
Reference in New Issue
Block a user