Skip to content

Commit db26ad6

Browse files
committed
Adding testcase for xtensor_fixed
1 parent 0f6f58a commit db26ad6

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

test/test_sfinae.cpp

+7-7
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
#include "test_common_macros.hpp"
1414
#include "xtensor/xtensor.hpp"
1515
#include "xtensor/xarray.hpp"
16-
// #include "xtensor/xfixed.hpp"
16+
#include "xtensor/xfixed.hpp"
1717
#include "xtensor/xview.hpp"
1818

1919
namespace xt
@@ -35,13 +35,13 @@ namespace xt
3535
xt::xarray<size_t> a = {{9, 9, 9}, {9, 9, 9}};
3636
xt::xtensor<size_t, 1> b = {9, 9};
3737
xt::xtensor<size_t, 2> c = {{9, 9}, {9, 9}};
38-
// xt::xtensor_fixed<size_t, xt::xshape<2, 2>> d = {{9, 9}, {9, 9}};
38+
xt::xtensor_fixed<size_t, xt::xshape<2, 2>> d = {{9, 9}, {9, 9}};
3939
auto v = xt::view(c, 0, xt::all());
4040

4141
EXPECT_TRUE(sfinae_rank_basic_func(a) == 0ul);
4242
EXPECT_TRUE(sfinae_rank_basic_func(b) == 0ul);
4343
EXPECT_TRUE(sfinae_rank_basic_func(c) == 2ul);
44-
// EXPECT_TRUE(sfinae_rank_basic_func(d) == 2ul);
44+
EXPECT_TRUE(sfinae_rank_basic_func(d) == 2ul);
4545
EXPECT_TRUE(sfinae_rank_basic_func(v) == 0ul);
4646
EXPECT_TRUE(sfinae_rank_basic_func(2ul * a) == 0ul);
4747
EXPECT_TRUE(sfinae_rank_basic_func(2ul * b) == 0ul);
@@ -72,13 +72,13 @@ namespace xt
7272
xt::xarray<size_t> a = {{9, 9, 9}, {9, 9, 9}};
7373
xt::xtensor<size_t, 1> b = {9, 9};
7474
xt::xtensor<size_t, 2> c = {{9, 9}, {9, 9}};
75-
// xt::xtensor_fixed<size_t, xt::xshape<2, 2>> d = {{9, 9}, {9, 9}};
75+
xt::xtensor_fixed<size_t, xt::xshape<2, 2>> d = {{9, 9}, {9, 9}};
7676
auto v = xt::view(c, 0, xt::all());
7777

7878
EXPECT_TRUE(sfinae_rank_func(a) == 0ul);
7979
EXPECT_TRUE(sfinae_rank_func(b) == 1ul);
8080
EXPECT_TRUE(sfinae_rank_func(c) == 2ul);
81-
// EXPECT_TRUE(sfinae_rank_func(d) == 2ul);
81+
EXPECT_TRUE(sfinae_rank_func(d) == 2ul);
8282
EXPECT_TRUE(sfinae_rank_func(v) == 0ul);
8383
EXPECT_TRUE(sfinae_rank_func(2ul * a) == 0ul);
8484
EXPECT_TRUE(sfinae_rank_func(2ul * b) == 0ul);
@@ -102,13 +102,13 @@ namespace xt
102102
xt::xarray<size_t> a = {{9, 9, 9}, {9, 9, 9}};
103103
xt::xtensor<size_t, 1> b = {9, 9};
104104
xt::xtensor<size_t, 2> c = {{9, 9}, {9, 9}};
105-
// xt::xtensor_fixed<size_t, xt::xshape<2, 2>> d = {{9, 9}, {9, 9}};
105+
xt::xtensor_fixed<size_t, xt::xshape<2, 2>> d = {{9, 9}, {9, 9}};
106106
auto v = xt::view(c, 0, xt::all());
107107

108108
EXPECT_TRUE(sfinae_fixed_func(a) == false);
109109
EXPECT_TRUE(sfinae_fixed_func(b) == true);
110110
EXPECT_TRUE(sfinae_fixed_func(c) == true);
111-
// EXPECT_TRUE(sfinae_fixed_func(d) == 2ul);
111+
EXPECT_TRUE(sfinae_fixed_func(d) == 2ul);
112112
EXPECT_TRUE(sfinae_fixed_func(v) == false);
113113
EXPECT_TRUE(sfinae_fixed_func(2ul * a) == false);
114114
EXPECT_TRUE(sfinae_fixed_func(2ul * b) == false);

0 commit comments

Comments
 (0)