aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Gael Guennebaud <g.gael@free.fr>2016-07-22 14:34:19 +0200
committerGravatar Gael Guennebaud <g.gael@free.fr>2016-07-22 14:34:19 +0200
commitd075d122ea142c9c4ee2e7837493396f54916bc0 (patch)
tree1b141fce892e07dd55bfa0c65059ca6513329732
parent47afc9a365dc3657ac84c9949f1d332009f7d641 (diff)
Move half unit test from unsupported to main tests
-rw-r--r--test/CMakeLists.txt1
-rw-r--r--test/half_float.cpp (renamed from unsupported/test/cxx11_float16.cpp)8
-rw-r--r--unsupported/test/CMakeLists.txt1
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)