Commit | Line | Data |
---|---|---|
951c7801 C |
1 | @anyid@ |
2 | type t; | |
3 | identifier id; | |
4 | constant cst; | |
5 | fresh identifier new = id ## "_is_constant"; | |
6 | @@ | |
7 | ||
8 | t id = cst; | |
9 | +t new; | |
10 | ||
11 | @contains@ | |
12 | type t; | |
13 | identifier anyid.id; | |
f3c4ece6 | 14 | constant anyid.cst =~ ".*FOO"; |
951c7801 C |
15 | fresh identifier contains = id ##"_equals_cst_that_contains_FOO"; |
16 | @@ | |
17 | ||
18 | t id = cst; | |
19 | +t contains; | |
20 | ||
21 | @nocontain@ | |
22 | type t; | |
23 | identifier anyid.id; | |
f3c4ece6 | 24 | constant anyid.cst !=~ ".*FOO"; |
951c7801 C |
25 | fresh identifier nocontain = id ##"_equals_cst_that_doesn_t_contain_FOO"; |
26 | @@ | |
27 | ||
28 | t id = cst; | |
29 | +t nocontain; | |
30 | ||
31 | @endsby@ | |
32 | type t; | |
33 | identifier anyid.id; | |
f3c4ece6 | 34 | constant anyid.cst =~ ".*FOO$"; |
951c7801 C |
35 | fresh identifier endsby = id ##"_equals_cst_that_ends_by_FOO"; |
36 | @@ | |
37 | ||
38 | t id = cst; | |
39 | +t endsby; | |
40 | ||
41 | @beginsby@ | |
42 | type t; | |
43 | identifier anyid.id; | |
f3c4ece6 | 44 | constant anyid.cst =~ "^FOO"; |
951c7801 C |
45 | fresh identifier beginsby = id ##"_equals_cst_that_begins_by_FOO"; |
46 | @@ | |
47 | ||
48 | t id = cst; | |
49 | +t beginsby; |