diff options
author | Jordan Maples [MSFT] <49793787+JordanMaples@users.noreply.github.com> | 2019-12-20 01:05:02 +0300 |
---|---|---|
committer | Jordan Maples [MSFT] <49793787+JordanMaples@users.noreply.github.com> | 2019-12-20 01:05:02 +0300 |
commit | 8577033f13a05984824d5d3cd73bafbac1c28080 (patch) | |
tree | 05e6616b28cd11574e9cb10b5ec9478f62d28ec0 /tests/assertion_tests.cpp | |
parent | 3539bd8008ed872f63d3ca71319cf4e5abbfe6c9 (diff) |
addressing comments
Diffstat (limited to 'tests/assertion_tests.cpp')
-rw-r--r-- | tests/assertion_tests.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/tests/assertion_tests.cpp b/tests/assertion_tests.cpp index 0e4dd34..a42c209 100644 --- a/tests/assertion_tests.cpp +++ b/tests/assertion_tests.cpp @@ -24,12 +24,13 @@ //disable warnings from gtest #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wundef" -#endif +#endif // __clang__ || __GNUC__ + #if __clang__ #pragma GCC diagnostic ignored "-Wglobal-constructors" #pragma GCC diagnostic ignored "-Wused-but-marked-unused" #pragma GCC diagnostic ignored "-Wcovered-switch-default" -#endif +#endif // __clang__ #include <gtest/gtest.h> #include <gsl/gsl_assert> // for fail_fast (ptr only), Ensures, Expects @@ -38,6 +39,8 @@ using namespace gsl; namespace { +static constexpr char deathstring[] = "Expected Death"; + int f(int i) { Expects(i > 0 && i < 10); @@ -50,8 +53,6 @@ int g(int i) Ensures(i > 0 && i < 10); return i; } - -static const char *deathstring("Expected Death"); } // namespace TEST(assertion_tests, expects) @@ -79,4 +80,4 @@ TEST(assertion_tests, ensures) #if __clang__ || __GNUC__ #pragma GCC diagnostic pop -#endif +#endif // __clang__ || __GNUC__ |