diff options
Diffstat (limited to 'libcxx/test/std/containers/associative/map')
-rw-r--r-- | libcxx/test/std/containers/associative/map/map.access/at.pass.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/libcxx/test/std/containers/associative/map/map.access/at.pass.cpp b/libcxx/test/std/containers/associative/map/map.access/at.pass.cpp index c5f77bf5f0f..6d3e98e9e78 100644 --- a/libcxx/test/std/containers/associative/map/map.access/at.pass.cpp +++ b/libcxx/test/std/containers/associative/map/map.access/at.pass.cpp @@ -7,7 +7,6 @@ // //===----------------------------------------------------------------------===// -// XFAIL: libcpp-no-exceptions // <map> // class map @@ -19,6 +18,7 @@ #include <cassert> #include "min_allocator.h" +#include "test_macros.h" int main() { @@ -43,6 +43,7 @@ int main() assert(m.at(3) == 3.5); assert(m.at(4) == 4.5); assert(m.at(5) == 5.5); +#ifndef TEST_HAS_NO_EXCEPTIONS try { m.at(6); @@ -51,6 +52,7 @@ int main() catch (std::out_of_range&) { } +#endif assert(m.at(7) == 7.5); assert(m.at(8) == 8.5); assert(m.size() == 7); @@ -74,6 +76,7 @@ int main() assert(m.at(3) == 3.5); assert(m.at(4) == 4.5); assert(m.at(5) == 5.5); +#ifndef TEST_HAS_NO_EXCEPTIONS try { m.at(6); @@ -82,6 +85,7 @@ int main() catch (std::out_of_range&) { } +#endif assert(m.at(7) == 7.5); assert(m.at(8) == 8.5); assert(m.size() == 7); @@ -108,6 +112,7 @@ int main() assert(m.at(3) == 3.5); assert(m.at(4) == 4.5); assert(m.at(5) == 5.5); +#ifndef TEST_HAS_NO_EXCEPTIONS try { m.at(6); @@ -116,6 +121,7 @@ int main() catch (std::out_of_range&) { } +#endif assert(m.at(7) == 7.5); assert(m.at(8) == 8.5); assert(m.size() == 7); @@ -139,6 +145,7 @@ int main() assert(m.at(3) == 3.5); assert(m.at(4) == 4.5); assert(m.at(5) == 5.5); +#ifndef TEST_HAS_NO_EXCEPTIONS try { m.at(6); @@ -147,6 +154,7 @@ int main() catch (std::out_of_range&) { } +#endif assert(m.at(7) == 7.5); assert(m.at(8) == 8.5); assert(m.size() == 7); |