Howard Hinnant
d9cdb2dcfd
Need one more swap overload for swapping two lvalue vector<bool>::reference's.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@178016 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-26 13:48:57 +00:00
Howard Hinnant
782da33d1c
Added debug tests for indexing, pop_back and both forms of erase. Added an improved error message for erasing a single element with end().
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@177929 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-25 22:12:26 +00:00
Howard Hinnant
c1ca2e1e8b
Remove some erroneous code I was using to debug debug mode.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@177908 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-25 20:46:07 +00:00
Howard Hinnant
295891fdc2
Debug mode tests for vector::front and back.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@177904 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-25 20:31:25 +00:00
Howard Hinnant
0d01eb54e7
More vector::iterator debug mode tests. Run by adding to OPTIONS -D_LIBCPP_DEBUG2=1.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@177897 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-25 20:03:19 +00:00
Howard Hinnant
f5f4684e71
Debug mode: learning to crawl. I need to set up some tests that actually test that the debug mode is working, but that won't cause problems when debug mode isn't on. This is my first prototype of such a test. It should call std::terminate() because it's comparing iterators from different containers. And std::terminate() is rigged up to exit normally. If debug mode fails, and doesn't call terminate, then the program asserts. The test is a no-op if _LIBCPP_DEBUG2 is not defined or is defined to be 0.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@177892 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-25 19:29:35 +00:00
Howard Hinnant
ae7bf9daac
Marshall Clow found some divide-by-zero warnings with UBSan in rand's binomial_distribution test. This eliminates the divide-by-zeros and describes in comments the numerical difficulties the test is having. Each of the problematic tests are exploring edge cases of the distribution.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@177826 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-23 19:29:45 +00:00
Howard Hinnant
9976b5511a
This is a start at making the libc++ test suite friendlier to the -fnoexceptions flag. Although this is not a complete solution, it does reduce the number of test failures on OS X from 467 to 128 on OS X when -fno-exceptions is enabled, and does not impact the number of failures at all when -fno-exceptions is not enabled. The bulk of this code was donated anonymously.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@177824 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-23 17:27:16 +00:00
Howard Hinnant
06d8bf6ce2
Test cleanup with respect to use of deprecated tmpnam function. Also Windows port for these tests to use _tempnam. The bulk of this patch was donated anonymously. I've tested it on OS X and accept responsibility for it. If I've broken anyone's platform by switching from tmpnam to mktemp for the generation of temporary file names, just let me know. Should be easy to fix in test/support/platform_support.h
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@177755 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-22 20:05:40 +00:00
Marshall Clow
bdea27ba8f
Fix bug in test; found by AddressSanitizer
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@177464 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-20 00:01:48 +00:00
Marshall Clow
c19fe86743
Fix bug in test; found by AddressSanitizer
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@177355 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-18 23:39:36 +00:00
Marshall Clow
dece7fe670
Removed raw references to __APPLE__; now just check to see if it is defined.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@177297 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-18 17:45:34 +00:00
Marshall Clow
a22d2addb1
Removed raw references to _WIN32; now just check to see if it is defined.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@177291 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-18 17:04:29 +00:00
Howard Hinnant
6319f1462d
Parsing floating point numbers with very long precision was broken, and this patch fixes it. This fixes http://llvm.org/bugs/show_bug.cgi?id=15445 .
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@176711 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-08 19:06:24 +00:00
David Chisnall
76aa2ef017
Fix a bug in mutex_try_to_lock. This was previously trying to unlock a mutex that it didn't own, causing an assertion failure in mutex.cpp. The issue was that the unique_lock went out of scope, releasing the lock on m, then m.unlock() was called on an already-unlocked mutex.
...
This change removes the spurious m.unlock() call.
If this test was previously passing for anyone with assertions enabled, then they should investigate bugs in their pthread implementation, as pthread_unlock() should not return 0 if the mutex is currently unlocked.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@175506 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-19 11:28:45 +00:00
Daniel Dunbar
3bc6a98c3e
[tests] Add support for a link_flags lit parameter.
...
- This is useful for testing with custom ABI libraries.
- Patch by Michael van der Westhuizen.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@174997 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-12 19:28:51 +00:00
Daniel Dunbar
6b875ef374
[tests] Another batch of timeout increases.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@174902 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-11 21:04:34 +00:00
Daniel Dunbar
8eba41324c
[tests] Another batch of timeout increases.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@174726 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-08 18:26:55 +00:00
Daniel Dunbar
1608b64881
[tests] Add back stdc macros I accidentally refactored out.
...
- Patch by Michael van der Westhuizen:
--
r174404 accidentally removed stdc format, limit and constant macros from the Linux test runner logic. This small patch re-adds the macros.
Making this change fixes the following tests on Linux:
- depr/depr.c.headers/inttypes_h.pass.cpp
- depr/depr.c.headers/stdint_h.pass.cpp
- input.output/file.streams/c.files/cinttypes.pass.cpp
- language.support/cstdint/cstdint.syn/cstdint.pass.cpp
--
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@174722 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-08 17:41:28 +00:00
Daniel Dunbar
fe14b970ac
[tests] Increase a bunch of wait limits.
...
- Basically I just ran the thread tests many many times on a busy machine and
bumped the timeouts whenever I hit a test failure.
- This is obviously subpar, but is the best I can do without the tests being
rewritten to not depend on arbitrary timeouts.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@174721 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-08 17:41:19 +00:00
Howard Hinnant
66a48c5ad5
Give a lot more timing latitude to some of the timing tests. Busy buildbots are hitting the timing limits too often.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@174539 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-06 20:25:56 +00:00
Daniel Dunbar
7fa0ca75e5
[tests] Infer the cxx_under_test (as clang++).
...
- This is a reasonable default, and makes testing just work with no required
parameters.
- Add notes on all of the inferred or default values.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@174538 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-06 20:24:23 +00:00
Daniel Dunbar
88dec1ef5c
[tests] Change test default to run against locally built library.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@174528 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-06 17:47:08 +00:00
Daniel Dunbar
6b8b9922f0
[tests] Enable use_system_lib support on Linux.
...
- Patch by Michael van der Westhuizen.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@174527 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-06 17:45:53 +00:00
Daniel Dunbar
cedb7fcc10
[tests] One last batch of XFAILs, for tests using new symbols added to libc++.
...
- As of this commit, the test suite should now fully pass on both darwin11 and
darwin12 when testing against either a locally built libc++ or the system libc++.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@174478 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-06 00:59:06 +00:00
Daniel Dunbar
5f4841fb83
[tests] Accept XFAIL arguments that match any part of a feature.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@174469 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-06 00:04:52 +00:00
Daniel Dunbar
43807c2fba
[tests] XFAIL some locale tests that don't seem to work on any Darwin.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@174459 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-05 22:51:20 +00:00
Daniel Dunbar
4cceb7a5e8
[tests] If no explicit target triple is given, try to infer it.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@174454 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-05 22:28:03 +00:00
Daniel Dunbar
8b9eee35d8
[tests] Mark another stream input expected failure (with system libc++).
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@174453 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-05 22:21:52 +00:00
Daniel Dunbar
548d392d5d
[tests] Mark another stream input expected failure (with system libc++).
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@174452 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-05 22:10:28 +00:00
Daniel Dunbar
c8e1889601
[tests] Mark some string.conversions expected failures (with system libc++).
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@174451 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-05 22:10:27 +00:00
Daniel Dunbar
edfb05351e
[tests] XFAIL a few things that require libc (?) support missing on Darwin.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@174450 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-05 22:10:25 +00:00
Daniel Dunbar
aac8dd8331
[tests] Mark some istream.unformatted expected failures (with system libc++).
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@174444 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-05 21:43:32 +00:00
Daniel Dunbar
a5b51964c1
[tests] Add an available feature that combines the triple and use_system_lib.
...
- This is so that we can easily write XFAIL markers for tests that are known
to fail with versions of libc++ as were shipped with a particular triple.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@174443 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-05 21:43:30 +00:00
Daniel Dunbar
81d1ef7a3f
[tests] Add support for REQUIRES and XFAIL lines in libc++ tests.
...
- We parse up to the first non-empty non-comment (C++ style) line, otherwise
the format and semantics match what is used for LLVM/Clang tests.
- For now, the only interesting thing to test against is a user supplied
target_triple test parameter.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@174440 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-05 21:03:25 +00:00
Daniel Dunbar
cccf25579a
[tests] Add a 'use_system_lib' parameter.
...
- This controls whether to execute against the locally built library or
not. The default is currently True which maps to what was already being done
by default.
- I'd appreciate it if someone can implement the proper handling of this flag
on linux, I no longer remember the details of its .so handling.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@174404 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-05 18:03:49 +00:00
Howard Hinnant
5ce391e336
Make a few tests optimization-proof. These tests were failing under -O3 because the optimizer was eliminating the call to new.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@172631 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-16 17:56:06 +00:00
Howard Hinnant
b05a55675f
Make <cmath> classification macros work with integral types.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@172461 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-14 20:56:22 +00:00
Howard Hinnant
3e3ae9ec41
Fix string conversions functions to throw out_of_range properly. Fixes http://llvm.org/bugs/show_bug.cgi?id=14919 .
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@172447 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-14 18:59:43 +00:00
Howard Hinnant
b4ebb0e415
Michael van der Westhuizen: Improve support for testing on Linux. Fixes http://llvm.org/bugs/show_bug.cgi?id=14892 .
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@172436 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-14 17:12:54 +00:00
Howard Hinnant
750039f50c
Michael van der Westhuizen: Patches for Linux. Fixes http://llvm.org/bugs/show_bug.cgi?id=14648 .
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@172435 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-14 17:07:27 +00:00
Howard Hinnant
f619e230cc
Fix exception safety bug in vector::push_back
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@172250 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-11 20:36:59 +00:00
Marshall Clow
304c31b355
Made test output iterators have value_type of 'void'; matches ones in library
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@171980 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-09 17:20:02 +00:00
Marshall Clow
83e2c4d877
Move common header files into a 'support' directory; make 'testit' include -I to that directory; rename 'iterators.h' to 'iterator_test.h'; remove hard-coded paths to include files from more than 350 source files
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@171594 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-05 03:21:01 +00:00
Howard Hinnant
6ae47055f9
atomic_bool was missing (just a typedef to atomic<bool>).
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@171498 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-04 18:58:50 +00:00
Marshall Clow
8226d0b7c5
...and then there was one. Only one copy of 'iterators.h' in the test tree for libc++
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@171479 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-04 18:24:04 +00:00
Marshall Clow
239e341c94
Removed another copy of 'iterators.h' files in libcxx/test
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@171456 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-03 03:57:56 +00:00
Marshall Clow
ba1920fe4b
Removed several more different 'iterators.h' files in libcxx/test
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@171452 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-03 02:29:29 +00:00
Marshall Clow
002a984948
Removed 7 (of 8) different 'iterators.h' files in test/localization
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@171443 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-03 01:45:09 +00:00
Howard Hinnant
352bd3a273
Klaas de Vries: Fix bug in libc++'s std::string::find_first_not_of.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@171321 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-31 20:09:48 +00:00