Eric Fiselier | f912759 | 2017-01-21 00:02:12 +0000 | [diff] [blame] | 1 | //===----------------------------------------------------------------------===// |
| 2 | // |
Chandler Carruth | 57b08b0 | 2019-01-19 10:56:40 +0000 | [diff] [blame] | 3 | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. |
| 4 | // See https://llvm.org/LICENSE.txt for license information. |
| 5 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
Eric Fiselier | f912759 | 2017-01-21 00:02:12 +0000 | [diff] [blame] | 6 | // |
| 7 | //===----------------------------------------------------------------------===// |
| 8 | |
Louis Dionne | 31cbe0f | 2020-06-01 10:38:23 -0400 | [diff] [blame^] | 9 | // UNSUPPORTED: c++03 |
Eric Fiselier | f912759 | 2017-01-21 00:02:12 +0000 | [diff] [blame] | 10 | |
| 11 | // <string> |
| 12 | |
| 13 | // Test that <string> provides all of the arithmetic, enum, and pointer |
| 14 | // hash specializations. |
| 15 | |
| 16 | #include <string> |
| 17 | |
Nico Weber | cc89063 | 2019-08-21 00:14:12 +0000 | [diff] [blame] | 18 | #include "poisoned_hash_helper.h" |
Eric Fiselier | f912759 | 2017-01-21 00:02:12 +0000 | [diff] [blame] | 19 | |
Marshall Clow | 7fc6a55 | 2019-05-31 18:35:30 +0000 | [diff] [blame] | 20 | #include "test_macros.h" |
| 21 | |
JF Bastien | 2df59c5 | 2019-02-04 20:31:13 +0000 | [diff] [blame] | 22 | int main(int, char**) { |
Eric Fiselier | f912759 | 2017-01-21 00:02:12 +0000 | [diff] [blame] | 23 | test_library_hash_specializations_available(); |
| 24 | { |
| 25 | test_hash_enabled_for_type<std::string>(); |
| 26 | test_hash_enabled_for_type<std::wstring>(); |
Marshall Clow | 7dad0bd | 2018-12-11 04:35:44 +0000 | [diff] [blame] | 27 | #if defined(__cpp_lib_char8_t) && __cpp_lib_char8_t >= 201811L |
| 28 | test_hash_enabled_for_type<std::u8string>(); |
| 29 | #endif |
Eric Fiselier | f912759 | 2017-01-21 00:02:12 +0000 | [diff] [blame] | 30 | #ifndef _LIBCPP_HAS_NO_UNICODE_CHARS |
| 31 | test_hash_enabled_for_type<std::u16string>(); |
| 32 | test_hash_enabled_for_type<std::u32string>(); |
| 33 | #endif |
| 34 | } |
JF Bastien | 2df59c5 | 2019-02-04 20:31:13 +0000 | [diff] [blame] | 35 | |
| 36 | return 0; |
Eric Fiselier | f912759 | 2017-01-21 00:02:12 +0000 | [diff] [blame] | 37 | } |