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