blob: b819d40f25a1a04f90bf06b3fada88c888ed0603 [file] [log] [blame]
Douglas Gregorecc2c092011-12-01 22:20:10 +00001// RUN: rm -rf %t
Douglas Gregorc514a8a2012-01-03 15:21:29 +00002// RUN: %clang_cc1 -Eonly -fmodule-cache-path %t -fmodules -I %S/Inputs/submodules %s -verify
Douglas Gregorecc2c092011-12-01 22:20:10 +00003
4__import_module__ std.vector;
5
Douglas Gregor13292642011-12-02 15:45:10 +00006#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 Gregorecc2c092011-12-01 22:20:10 +000017
18__import_module__ std.typetraits; // expected-error{{no submodule named 'typetraits' in module 'std'; did you mean 'type_traits'?}}
19
Douglas Gregor13292642011-12-02 15:45:10 +000020#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 Gregorecc2c092011-12-01 22:20:10 +000031
32__import_module__ std.vector.compare; // expected-error{{no submodule named 'compare' in module 'std.vector'}}
Douglas Gregor13292642011-12-02 15:45:10 +000033
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