Move half unit test from unsupported to main tests

This commit is contained in:
Gael Guennebaud 2016-07-22 14:34:19 +02:00
parent 47afc9a365
commit d075d122ea
3 changed files with 4 additions and 6 deletions

View File

@ -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)

View File

@ -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());

View File

@ -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)