diff options
104 files changed, 3 insertions, 98211 deletions
diff --git a/tests/libcxx/main.cpp b/tests/hashtest.cpp index fefb6cc3..fefb6cc3 100644 --- a/tests/libcxx/main.cpp +++ b/tests/hashtest.cpp diff --git a/tests/libcxx/LICENSE.txt b/tests/libcxx/LICENSE.txt deleted file mode 100644 index 926f0676..00000000 --- a/tests/libcxx/LICENSE.txt +++ /dev/null @@ -1,76 +0,0 @@ -============================================================================== -libc++ License -============================================================================== - -The libc++ library is dual licensed under both the University of Illinois -"BSD-Like" license and the MIT license. As a user of this code you may choose -to use it under either license. As a contributor, you agree to allow your code -to be used under both. - -Full text of the relevant licenses is included below. - -============================================================================== - -University of Illinois/NCSA -Open Source License - -Copyright (c) 2009-2010 by the contributors listed in CREDITS.TXT - -All rights reserved. - -Developed by: - - LLVM Team - - University of Illinois at Urbana-Champaign - - http://llvm.org - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal with -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - - * Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimers. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimers in the - documentation and/or other materials provided with the distribution. - - * Neither the names of the LLVM Team, University of Illinois at - Urbana-Champaign, nor the names of its contributors may be used to - endorse or promote products derived from this Software without specific - prior written permission. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE -SOFTWARE. - -============================================================================== - -Copyright (c) 2009-2010 by the contributors listed in CREDITS.TXT - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/tests/libcxx/hash.cpp b/tests/libcxx/hash.cpp deleted file mode 100644 index 728b9bd3..00000000 --- a/tests/libcxx/hash.cpp +++ /dev/null @@ -1,559 +0,0 @@ -//===-------------------------- hash.cpp ----------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#include "__hash_table" -#include "algorithm" -#include "stdexcept" - -_LIBCPP_BEGIN_NAMESPACE_STD - -namespace { - -// handle all next_prime(i) for i in [1, 210), special case 0 -const unsigned small_primes[] = -{ - 0, - 2, - 3, - 5, - 7, - 11, - 13, - 17, - 19, - 23, - 29, - 31, - 37, - 41, - 43, - 47, - 53, - 59, - 61, - 67, - 71, - 73, - 79, - 83, - 89, - 97, - 101, - 103, - 107, - 109, - 113, - 127, - 131, - 137, - 139, - 149, - 151, - 157, - 163, - 167, - 173, - 179, - 181, - 191, - 193, - 197, - 199, - 211 -}; - -// potential primes = 210*k + indices[i], k >= 1 -// these numbers are not divisible by 2, 3, 5 or 7 -// (or any integer 2 <= j <= 10 for that matter). -const unsigned indices[] = -{ - 1, - 11, - 13, - 17, - 19, - 23, - 29, - 31, - 37, - 41, - 43, - 47, - 53, - 59, - 61, - 67, - 71, - 73, - 79, - 83, - 89, - 97, - 101, - 103, - 107, - 109, - 113, - 121, - 127, - 131, - 137, - 139, - 143, - 149, - 151, - 157, - 163, - 167, - 169, - 173, - 179, - 181, - 187, - 191, - 193, - 197, - 199, - 209 -}; - -} - -// Returns: If n == 0, returns 0. Else returns the lowest prime number that -// is greater than or equal to n. -// -// The algorithm creates a list of small primes, plus an open-ended list of -// potential primes. All prime numbers are potential prime numbers. However -// some potential prime numbers are not prime. In an ideal world, all potential -// prime numbers would be prime. Candiate prime numbers are chosen as the next -// highest potential prime. Then this number is tested for prime by dividing it -// by all potential prime numbers less than the sqrt of the candidate. -// -// This implementation defines potential primes as those numbers not divisible -// by 2, 3, 5, and 7. Other (common) implementations define potential primes -// as those not divisible by 2. A few other implementations define potential -// primes as thos |