diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2017-01-02 19:18:58 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2017-01-02 19:18:58 +0000 |
commit | 53a420fba21cf1644972b34dcd811a43cdb8368d (patch) | |
tree | 66a19f6f8b65215772549a51d688492ab8addc0d /test/std/containers/sequences/array/at.pass.cpp | |
parent | b50f1549701eb950921e5d6f2e55ba1a1dadbb43 (diff) |
Notes
Diffstat (limited to 'test/std/containers/sequences/array/at.pass.cpp')
-rw-r--r-- | test/std/containers/sequences/array/at.pass.cpp | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/test/std/containers/sequences/array/at.pass.cpp b/test/std/containers/sequences/array/at.pass.cpp index 9707beeb39461..29483153d4ab6 100644 --- a/test/std/containers/sequences/array/at.pass.cpp +++ b/test/std/containers/sequences/array/at.pass.cpp @@ -7,7 +7,6 @@ // //===----------------------------------------------------------------------===// -// XFAIL: libcpp-no-exceptions // <array> // reference operator[] (size_type) @@ -40,8 +39,14 @@ int main() r2 = 7.5; assert(c.back() == 7.5); - try { (void) c.at(3); } +#ifndef TEST_HAS_NO_EXCEPTIONS + try + { + (void) c.at(3); + assert(false); + } catch (const std::out_of_range &) {} +#endif } { typedef double T; @@ -53,8 +58,14 @@ int main() C::const_reference r2 = c.at(2); assert(r2 == 3.5); - try { (void) c.at(3); } +#ifndef TEST_HAS_NO_EXCEPTIONS + try + { + (void) c.at(3); + assert(false); + } catch (const std::out_of_range &) {} +#endif } #if TEST_STD_VER > 11 |