Added tests for negative multi-span access.

This commit is contained in:
Krzysztof Wrzalik 2016-09-18 17:44:45 +02:00
parent 8361aae39e
commit 22c2785452

View File

@ -1084,6 +1084,12 @@ SUITE(multi_span_tests)
CHECK_THROW(av[10][2], fail_fast); CHECK_THROW(av[10][2], fail_fast);
CHECK_THROW((av[{10, 2}]), fail_fast); CHECK_THROW((av[{10, 2}]), fail_fast);
CHECK_THROW(av[-1][0], fail_fast);
CHECK_THROW((av[{-1, 0}]), fail_fast);
CHECK_THROW(av[0][-1], fail_fast);
CHECK_THROW((av[{0, -1}]), fail_fast);
} }
void overloaded_func(multi_span<const int, dynamic_range, 3, 5> exp, int expected_value) void overloaded_func(multi_span<const int, dynamic_range, 3, 5> exp, int expected_value)