Douglas Gregor | ecc2c09 | 2011-12-01 22:20:10 +0000 | [diff] [blame] | 1 | // RUN: rm -rf %t |
Douglas Gregor | c514a8a | 2012-01-03 15:21:29 +0000 | [diff] [blame^] | 2 | // RUN: %clang_cc1 -Eonly -fmodule-cache-path %t -fmodules -I %S/Inputs/submodules %s -verify |
Douglas Gregor | ecc2c09 | 2011-12-01 22:20:10 +0000 | [diff] [blame] | 3 | |
| 4 | __import_module__ std.vector; |
| 5 | |
Douglas Gregor | 1329264 | 2011-12-02 15:45:10 +0000 | [diff] [blame] | 6 | #ifndef HAVE_VECTOR |
| 7 | # error HAVE_VECTOR macro is not available (but should be) |
| 8 | #endif |
| 9 | |
| 10 | #ifdef HAVE_TYPE_TRAITS |
| 11 | # error HAVE_TYPE_TRAITS_MAP macro is available (but shouldn't be) |
| 12 | #endif |
| 13 | |
| 14 | #ifdef HAVE_HASH_MAP |
| 15 | # error HAVE_HASH_MAP macro is available (but shouldn't be) |
| 16 | #endif |
Douglas Gregor | ecc2c09 | 2011-12-01 22:20:10 +0000 | [diff] [blame] | 17 | |
| 18 | __import_module__ std.typetraits; // expected-error{{no submodule named 'typetraits' in module 'std'; did you mean 'type_traits'?}} |
| 19 | |
Douglas Gregor | 1329264 | 2011-12-02 15:45:10 +0000 | [diff] [blame] | 20 | #ifndef HAVE_VECTOR |
| 21 | # error HAVE_VECTOR macro is not available (but should be) |
| 22 | #endif |
| 23 | |
| 24 | #ifndef HAVE_TYPE_TRAITS |
| 25 | # error HAVE_TYPE_TRAITS_MAP macro is not available (but should be) |
| 26 | #endif |
| 27 | |
| 28 | #ifdef HAVE_HASH_MAP |
| 29 | # error HAVE_HASH_MAP macro is available (but shouldn't be) |
| 30 | #endif |
Douglas Gregor | ecc2c09 | 2011-12-01 22:20:10 +0000 | [diff] [blame] | 31 | |
| 32 | __import_module__ std.vector.compare; // expected-error{{no submodule named 'compare' in module 'std.vector'}} |
Douglas Gregor | 1329264 | 2011-12-02 15:45:10 +0000 | [diff] [blame] | 33 | |
| 34 | __import_module__ std; // import everything in 'std' |
| 35 | |
| 36 | #ifndef HAVE_VECTOR |
| 37 | # error HAVE_VECTOR macro is not available (but should be) |
| 38 | #endif |
| 39 | |
| 40 | #ifndef HAVE_TYPE_TRAITS |
| 41 | # error HAVE_TYPE_TRAITS_MAP macro is not available (but should be) |
| 42 | #endif |
| 43 | |
| 44 | #ifdef HAVE_HASH_MAP |
| 45 | # error HAVE_HASH_MAP macro is available (but shouldn't be) |
| 46 | #endif |
| 47 | |
| 48 | __import_module__ std.hash_map; |
| 49 | |
| 50 | #ifndef HAVE_VECTOR |
| 51 | # error HAVE_VECTOR macro is not available (but should be) |
| 52 | #endif |
| 53 | |
| 54 | #ifndef HAVE_TYPE_TRAITS |
| 55 | # error HAVE_TYPE_TRAITS_MAP macro is not available (but should be) |
| 56 | #endif |
| 57 | |
| 58 | #ifndef HAVE_HASH_MAP |
| 59 | # error HAVE_HASH_MAP macro is not available (but should be) |
| 60 | #endif |