aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnna Gringauze <annagrin@microsoft.com>2018-11-27 17:28:57 -0800
committerGitHub <noreply@github.com>2018-11-27 17:28:57 -0800
commitb67337571920363b7a7845de187f058e5dc3ba00 (patch)
tree6a0cf9ffc3107057543a6f97c2bc6092bd34bc4a
parentc02ddae4bcff82b17826fe3127e835f5aa54b485 (diff)
downloadplatform_external_Microsoft-GSL-b67337571920363b7a7845de187f058e5dc3ba00.tar.gz
platform_external_Microsoft-GSL-b67337571920363b7a7845de187f058e5dc3ba00.tar.bz2
platform_external_Microsoft-GSL-b67337571920363b7a7845de187f058e5dc3ba00.zip
Dev/annagrin/fix span size test gcc (#750)
* Added c++17 test configurations for clang5.0 and clang6.0 * fixed test for broken span.size() in gcc6.5
-rw-r--r--tests/span_tests.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/span_tests.cpp b/tests/span_tests.cpp
index b38b4eb..9637a0e 100644
--- a/tests/span_tests.cpp
+++ b/tests/span_tests.cpp
@@ -506,15 +506,16 @@ TEST_CASE("from_std_array_constructor")
CHECK((s.size() == narrow_cast<ptrdiff_t>(arr.size()) && s.data() == arr.data()));
}
- // This test checks for the bug found in gcc 6.1, 6.2, 6.3, 7.1, 7.2, 7.3 - issue #590
+ // This test checks for the bug found in gcc 6.1, 6.2, 6.3, 6.4, 6.5 7.1, 7.2, 7.3 - issue #590
{
span<int> s1 = make_span(arr);
static span<int> s2;
s2 = s1;
- #if __GNUC__ == 6 && __GNUC_MINOR__ == 4 && __GNUC_PATCHLEVEL__ == 0 && defined(__OPTIMIZE__)
- // Known to be broken in gcc 6.4 with optimizations
+ #if __GNUC__ == 6 && (__GNUC_MINOR__ == 4 || __GNUC_MINOR__ == 5) && __GNUC_PATCHLEVEL__ == 0 && \
+ defined(__OPTIMIZE__)
+ // Known to be broken in gcc 6.4 and 6.5 with optimizations
// Issue in gcc: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83116
CHECK(s1.size() == 4);
CHECK(s2.size() == 0);