Test for operator function call.

This commit is contained in:
Neil MacIntosh 2016-03-18 16:53:16 -07:00
parent c8a412f028
commit 85939048b4

View File

@ -732,7 +732,7 @@ SUITE(span_tests)
for (int i = 0; i < 4; ++i) CHECK(av2[i] == i + 2); for (int i = 0; i < 4; ++i) CHECK(av2[i] == i + 2);
} }
} }
#if 0
TEST(operator_function_call) TEST(operator_function_call)
{ {
int arr[4] = {1, 2, 3, 4}; int arr[4] = {1, 2, 3, 4};
@ -743,15 +743,15 @@ SUITE(span_tests)
CHECK_THROW(s(5), fail_fast); CHECK_THROW(s(5), fail_fast);
} }
int arr2d[2][3] = {1, 2, 3, 4, 5, 6};
{ {
span<int, 2, 3> s = arr2d; int arr2d[2] = {1, 6};
CHECK(s(0, 0) == 1); span<int, 2> s = arr2d;
CHECK(s(1, 2) == 6); CHECK(s(0) == 1);
CHECK(s(1) == 6);
CHECK_THROW(s(2) ,fail_fast);
} }
} }
#if 0
TEST(comparison_operators) TEST(comparison_operators)
{ {
{ {
@ -864,6 +864,8 @@ SUITE(span_tests)
} }
} }
#if 0
TEST(basics) TEST(basics)
{ {
auto ptr = as_span(new int[10], 10); auto ptr = as_span(new int[10], 10);