diff options
| author | Roger Ferrer Ibanez <roger.ferreribanez@arm.com> | 2016-11-14 10:44:26 +0000 |
|---|---|---|
| committer | Roger Ferrer Ibanez <roger.ferreribanez@arm.com> | 2016-11-14 10:44:26 +0000 |
| commit | 84c152a130ff95e52846dddd2cc6ad1c31648160 (patch) | |
| tree | 983f440031c3cbd0dbca231037cb36fc2b08311a /libcxx/test/std/strings/string.conversions/stoi.pass.cpp | |
| parent | 3d8482a88d5a3a43ef251e642b352fb1e4505335 (diff) | |
| download | bcm5719-llvm-84c152a130ff95e52846dddd2cc6ad1c31648160.tar.gz bcm5719-llvm-84c152a130ff95e52846dddd2cc6ad1c31648160.zip | |
Update tests for strings conversions under libcpp-no-exceptions
Differential Revision: https://reviews.llvm.org/D26139
llvm-svn: 286812
Diffstat (limited to 'libcxx/test/std/strings/string.conversions/stoi.pass.cpp')
| -rw-r--r-- | libcxx/test/std/strings/string.conversions/stoi.pass.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libcxx/test/std/strings/string.conversions/stoi.pass.cpp b/libcxx/test/std/strings/string.conversions/stoi.pass.cpp index 23807274070..8852d47f001 100644 --- a/libcxx/test/std/strings/string.conversions/stoi.pass.cpp +++ b/libcxx/test/std/strings/string.conversions/stoi.pass.cpp @@ -7,7 +7,6 @@ // //===----------------------------------------------------------------------===// -// XFAIL: libcpp-no-exceptions // <string> // int stoi(const string& str, size_t *idx = 0, int base = 10); @@ -16,6 +15,8 @@ #include <string> #include <cassert> +#include "test_macros.h" + int main() { assert(std::stoi("0") == 0); @@ -32,6 +33,7 @@ int main() idx = 0; assert(std::stoi(L"10g", &idx, 16) == 16); assert(idx == 2); +#ifndef TEST_HAS_NO_EXCEPTIONS if (std::numeric_limits<long>::max() > std::numeric_limits<int>::max()) { try @@ -106,4 +108,5 @@ int main() { assert(idx == 0); } +#endif } |

