aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorNeil MacIntosh <neilmac@microsoft.com>2016-03-18 16:53:16 -0700
committerNeil MacIntosh <neilmac@microsoft.com>2016-03-18 16:53:16 -0700
commit85939048b457e4808f2f9b8c29d257d53f24fe61 (patch)
tree06fa6c0ae1dccca4dff2f9d25640a8cda230c63c /tests
parentc8a412f0280d0fd79e5f1e150dafcf30b2751cbe (diff)
downloadplatform_external_Microsoft-GSL-85939048b457e4808f2f9b8c29d257d53f24fe61.tar.gz
platform_external_Microsoft-GSL-85939048b457e4808f2f9b8c29d257d53f24fe61.tar.bz2
platform_external_Microsoft-GSL-85939048b457e4808f2f9b8c29d257d53f24fe61.zip
Test for operator function call.
Diffstat (limited to 'tests')
-rw-r--r--tests/span_tests.cpp16
1 files changed, 9 insertions, 7 deletions
diff --git a/tests/span_tests.cpp b/tests/span_tests.cpp
index 01784f6..9afd943 100644
--- a/tests/span_tests.cpp
+++ b/tests/span_tests.cpp
@@ -732,7 +732,7 @@ SUITE(span_tests)
for (int i = 0; i < 4; ++i) CHECK(av2[i] == i + 2);
}
}
-#if 0
+
TEST(operator_function_call)
{
int arr[4] = {1, 2, 3, 4};
@@ -743,15 +743,15 @@ SUITE(span_tests)
CHECK_THROW(s(5), fail_fast);
}
- int arr2d[2][3] = {1, 2, 3, 4, 5, 6};
-
{
- span<int, 2, 3> s = arr2d;
- CHECK(s(0, 0) == 1);
- CHECK(s(1, 2) == 6);
+ int arr2d[2] = {1, 6};
+ span<int, 2> s = arr2d;
+ CHECK(s(0) == 1);
+ CHECK(s(1) == 6);
+ CHECK_THROW(s(2) ,fail_fast);
}
}
-
+#if 0
TEST(comparison_operators)
{
{
@@ -864,6 +864,8 @@ SUITE(span_tests)
}
}
+#if 0
+
TEST(basics)
{
auto ptr = as_span(new int[10], 10);