diff options
-rw-r--r-- | test/CMakeLists.txt | 1 | ||||
-rw-r--r-- | test/half_float.cpp (renamed from unsupported/test/cxx11_float16.cpp) | 8 | ||||
-rw-r--r-- | unsupported/test/CMakeLists.txt | 1 |
3 files changed, 4 insertions, 6 deletions
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index abc847794..e42e850ca 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -259,6 +259,7 @@ ei_add_test(dense_storage) ei_add_test(ctorleak) ei_add_test(mpl2only) ei_add_test(inplace_decomposition) +ei_add_test(half_float) add_executable(bug1213 bug1213.cpp bug1213_main.cpp) diff --git a/unsupported/test/cxx11_float16.cpp b/test/half_float.cpp index d2b48772e..289e4f662 100644 --- a/unsupported/test/cxx11_float16.cpp +++ b/test/half_float.cpp @@ -5,10 +5,6 @@ // Public License v. 2.0. If a copy of the MPL was not distributed // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. -#define EIGEN_TEST_NO_LONGDOUBLE -#define EIGEN_TEST_NO_COMPLEX -#define EIGEN_TEST_FUNC cxx11_float16 - #include <sstream> #include "main.h" @@ -19,6 +15,8 @@ using Eigen::half; void test_conversion() { + using Eigen::half_impl::__half; + // Conversion from float. VERIFY_IS_EQUAL(half(1.0f).x, 0x3c00); VERIFY_IS_EQUAL(half(0.5f).x, 0x3800); @@ -232,7 +230,7 @@ void test_array() ss << a1; } -void test_cxx11_float16() +void test_half_float() { CALL_SUBTEST(test_conversion()); CALL_SUBTEST(test_numtraits()); diff --git a/unsupported/test/CMakeLists.txt b/unsupported/test/CMakeLists.txt index c50ea53c5..6188b421a 100644 --- a/unsupported/test/CMakeLists.txt +++ b/unsupported/test/CMakeLists.txt @@ -117,7 +117,6 @@ ei_add_test(special_functions) # when using visual studio. We should make the check more strict to enable the tests for # newer versions of MSVC. if (NOT CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") -ei_add_test(cxx11_float16) ei_add_test(cxx11_tensor_dimension) ei_add_test(cxx11_tensor_map) ei_add_test(cxx11_tensor_assign) |