]>
git.saurik.com Git - apt.git/blob - triehash/tests/test-enum-include-name-flags
2 .
$(dirname $(readlink -f $0))/framework.sh
4 # Need a short word, we really just need to check if the labels work
8 #ifndef TRIE_HASH_PerfectHash
9 #define TRIE_HASH_PerfectHash
17 enum PerfectKey PerfectHash(const char *string, size_t length);
18 #endif /* TRIE_HASH_PerfectHash */" triehash
--multi-byte=0 -C /dev
/null
--include="<foo.h>" /dev
/stdin
20 # Check for --enum-class support
22 #ifndef TRIE_HASH_PerfectHash
23 #define TRIE_HASH_PerfectHash
26 enum class PerfectKey {
30 static enum PerfectKey PerfectHash(const char *string, size_t length);
31 static enum PerfectKey PerfectHash1(const char *string)
37 return PerfectKey::Unknown;
39 static enum PerfectKey PerfectHash(const char *string, size_t length)
43 return PerfectHash1(string);
45 return PerfectKey::Unknown;
48 #endif /* TRIE_HASH_PerfectHash */" triehash
--multi-byte=0 --enum-class /dev
/stdin
50 # Check for --enum-name support
52 #ifndef TRIE_HASH_PerfectHash
53 #define TRIE_HASH_PerfectHash
59 static enum Foo PerfectHash(const char *string, size_t length);
60 static enum Foo PerfectHash(const char *string, size_t length)
67 #endif /* TRIE_HASH_PerfectHash */\
68 " triehash
--multi-byte=0 --enum-name="Foo"
70 # Check for --enum-class support
72 #ifndef TRIE_HASH_PerfectHash
73 #define TRIE_HASH_PerfectHash
79 static enum Foo::Bar PerfectHash(const char *string, size_t length);
80 static enum Foo::Bar PerfectHash(const char *string, size_t length)
84 return Foo::Bar::Unknown;
87 #endif /* TRIE_HASH_PerfectHash */\
88 " triehash
--multi-byte=0 --enum-class --enum-name="Foo::Bar"
90 # Check for --function-name support
92 #ifndef TRIE_HASH_NonSense
93 #define TRIE_HASH_NonSense
99 static enum PerfectKey NonSense(const char *string, size_t length);
100 static enum PerfectKey NonSense(const char *string, size_t length)
107 #endif /* TRIE_HASH_NonSense */\
108 " triehash
--multi-byte=0 --function-name="NonSense"
110 # Check for --counter-name support
112 #ifndef TRIE_HASH_PerfectHash
113 #define TRIE_HASH_PerfectHash
116 enum { MyCounter = 0 };
120 static enum PerfectKey PerfectHash(const char *string, size_t length);
121 static enum PerfectKey PerfectHash(const char *string, size_t length)
128 #endif /* TRIE_HASH_PerfectHash */\
129 " triehash
--multi-byte=0 --counter-name="MyCounter"