Refactor basic/intmath tests into a single file (#757)

* Refactor basic/intmath tests into a single file

These six tests previously duplicated almost all of their sources in
separate files. Bring them into a single file with templated routines
to perform the tests.

This change also makes use of more C++ features and utilities from the
harness library to make the code cleaner.

* Fix array indices for initialization

* Use loop for buffer creation

* Refactor to remove duplicate verification code

Remove need for hardcoded number of test operations.

* Address review comments

* Use TEST_SKIPPED_ITSELF
This commit is contained in:
James Price
2020-05-06 11:32:31 -04:00
committed by GitHub
parent 77d755c8ee
commit bda0285c2a
8 changed files with 241 additions and 2023 deletions

View File

@@ -3,8 +3,7 @@ set(MODULE_NAME BASIC)
set(${MODULE_NAME}_SOURCES
main.cpp
test_fpmath_float.cpp test_fpmath_float2.cpp test_fpmath_float4.cpp
test_intmath_int.cpp test_intmath_int2.cpp test_intmath_int4.cpp
test_intmath_long.cpp test_intmath_long2.cpp test_intmath_long4.cpp
test_intmath.cpp
test_hiloeo.cpp test_local.cpp test_pointercast.cpp
test_if.cpp test_loop.cpp
test_readimage.cpp test_readimage_int16.cpp test_readimage_fp32.cpp