OSDN Git Service

Don't build libstdc++ host tests with the Bionic headers.
[android-x86/system-extras.git] / tests / bionic / libstdc++ / test_cctype.cpp
1 /*
2  * Copyright (C) 2009 The Android Open Source Project
3  * All rights reserved.
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions
7  * are met:
8  *  * Redistributions of source code must retain the above copyright
9  *    notice, this list of conditions and the following disclaimer.
10  *  * Redistributions in binary form must reproduce the above copyright
11  *    notice, this list of conditions and the following disclaimer in
12  *    the documentation and/or other materials provided with the
13  *    distribution.
14  *
15  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
16  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
17  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
18  * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
19  * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
20  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
21  * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
22  * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
23  * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
24  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
25  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26  * SUCH DAMAGE.
27  */
28
29 #include <cctype>
30 #if defined BIONIC && !defined BIONIC_LIBSTDCPP_INCLUDE_CCTYPE__
31 #error "Wrong header file included!!"
32 #endif
33
34
35 namespace {
36 const int kPassed = 0;
37 }  // anonymous namespace
38
39 namespace android
40 {
41 #ifdef isalnum
42 #error "should be a real function"
43 #endif
44 #ifdef isalpha
45 #error "should be a real function"
46 #endif
47 #ifdef iscntrl
48 #error "should be a real function"
49 #endif
50 #ifdef isdigit
51 #error "should be a real function"
52 #endif
53 #ifdef isgraph
54 #error "should be a real function"
55 #endif
56 #ifdef islower
57 #error "should be a real function"
58 #endif
59 #ifdef isprint
60 #error "should be a real function"
61 #endif
62 #ifdef ispunct
63 #error "should be a real function"
64 #endif
65 #ifdef isspace
66 #error "should be a real function"
67 #endif
68 #ifdef isupper
69 #error "should be a real function"
70 #endif
71 #ifdef isxdigit
72 #error "should be a real function"
73 #endif
74 #ifdef tolower
75 #error "should be a real function"
76 #endif
77 #ifdef toupper
78 #error "should be a real function"
79 #endif
80
81 using std::isalnum;
82 using std::isdigit;
83 using std::isprint;
84 using std::isupper;
85 using std::tolower;
86 using std::isalpha;
87 using std::isgraph;
88 using std::ispunct;
89 using std::isxdigit;
90 using std::toupper;
91 using std::iscntrl;
92 using std::islower;
93 using std::isspace;
94
95 }  // namespace android
96
97 int main(int argc, char **argv)
98 {
99     return kPassed;
100 }