aboutsummaryrefslogtreecommitdiff
path: root/tests/utils_tests.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/utils_tests.cpp')
-rw-r--r--tests/utils_tests.cpp15
1 files changed, 11 insertions, 4 deletions
diff --git a/tests/utils_tests.cpp b/tests/utils_tests.cpp
index 610efbf..587b0a1 100644
--- a/tests/utils_tests.cpp
+++ b/tests/utils_tests.cpp
@@ -18,13 +18,20 @@
#include <gsl/gsl_util> // for narrow, finally, narrow_cast, narrowing_e...
-#include <algorithm> // for move
-#include <functional> // for reference_wrapper, _Bind_helper<>::type
-#include <limits> // for numeric_limits
-#include <stdint.h> // for uint32_t, int32_t
+#include <algorithm> // for move
+#include <functional> // for reference_wrapper, _Bind_helper<>::type
+#include <limits> // for numeric_limits
+#include <stdint.h> // for uint32_t, int32_t
+#include <type_traits> // for is_same
using namespace gsl;
+TEST_CASE("sanity check for gsl::index typedef")
+{
+ static_assert(std::is_same<gsl::index, std::ptrdiff_t>::value,
+ "gsl::index represents wrong arithmetic type");
+}
+
void f(int& i) { i += 1; }
TEST_CASE("finally_lambda")