From f5e780fb05f64d759cba9cadc27444cf7ef0bfe7 Mon Sep 17 00:00:00 2001 From: Gael Guennebaud Date: Thu, 7 Jul 2016 08:59:59 +0200 Subject: split huge unit test --- unsupported/test/cxx11_tensor_morphing.cpp | 48 ++++++++++++++++-------------- 1 file changed, 25 insertions(+), 23 deletions(-) (limited to 'unsupported/test/cxx11_tensor_morphing.cpp') diff --git a/unsupported/test/cxx11_tensor_morphing.cpp b/unsupported/test/cxx11_tensor_morphing.cpp index c575d3fdc..ff5ed5255 100644 --- a/unsupported/test/cxx11_tensor_morphing.cpp +++ b/unsupported/test/cxx11_tensor_morphing.cpp @@ -13,6 +13,7 @@ using Eigen::Tensor; +template static void test_simple_reshape() { Tensor tensor1(2,3,1,7,1); @@ -40,7 +41,7 @@ static void test_simple_reshape() } } - +template static void test_reshape_in_expr() { MatrixXf m1(2,3*5*7*11); MatrixXf m2(3*5*7*11,13); @@ -65,7 +66,7 @@ static void test_reshape_in_expr() { } } - +template static void test_reshape_as_lvalue() { Tensor tensor(2,3,7); @@ -114,6 +115,7 @@ static void test_simple_slice() } } +template static void test_const_slice() { const float b[1] = {42}; @@ -459,25 +461,25 @@ static void test_composition() void test_cxx11_tensor_morphing() { - CALL_SUBTEST(test_simple_reshape()); - CALL_SUBTEST(test_reshape_in_expr()); - CALL_SUBTEST(test_reshape_as_lvalue()); - - CALL_SUBTEST(test_simple_slice()); - CALL_SUBTEST(test_simple_slice()); - CALL_SUBTEST(test_const_slice()); - CALL_SUBTEST(test_slice_in_expr()); - CALL_SUBTEST(test_slice_in_expr()); - CALL_SUBTEST(test_slice_as_lvalue()); - CALL_SUBTEST(test_slice_as_lvalue()); - CALL_SUBTEST(test_slice_raw_data()); - CALL_SUBTEST(test_slice_raw_data()); - - CALL_SUBTEST(test_strided_slice_write()); - CALL_SUBTEST(test_strided_slice()); - CALL_SUBTEST(test_strided_slice_write()); - CALL_SUBTEST(test_strided_slice()); - - CALL_SUBTEST(test_composition()); - CALL_SUBTEST(test_composition()); + CALL_SUBTEST_1(test_simple_reshape()); + CALL_SUBTEST_1(test_reshape_in_expr()); + CALL_SUBTEST_1(test_reshape_as_lvalue()); + + CALL_SUBTEST_1(test_simple_slice()); + CALL_SUBTEST_1(test_simple_slice()); + CALL_SUBTEST_1(test_const_slice()); + CALL_SUBTEST_2(test_slice_in_expr()); + CALL_SUBTEST_2(test_slice_in_expr()); + CALL_SUBTEST_2(test_slice_as_lvalue()); + CALL_SUBTEST_2(test_slice_as_lvalue()); + CALL_SUBTEST_2(test_slice_raw_data()); + CALL_SUBTEST_2(test_slice_raw_data()); + + CALL_SUBTEST_3(test_strided_slice_write()); + CALL_SUBTEST_3(test_strided_slice()); + CALL_SUBTEST_3(test_strided_slice_write()); + CALL_SUBTEST_3(test_strided_slice()); + + CALL_SUBTEST_3(test_composition()); + CALL_SUBTEST_3(test_composition()); } -- cgit v1.2.3