Debian Codegraph @

tests/pr11.fw

raw
1 PR11: Test parsing of library macros.
2
3 1. Ensure that 0..5 Ls are OK, but six or seven is an error.
4
5 @$@<Sloth_L0@>@Z@{@}
6 @$@<Sloth_L1@>@Z@L@{@}
7 @$@<Sloth_L2@>@Z@L@L@{@}
8 @$@<Sloth_L3@>@Z@L@L@L@{@}
9 @$@<Sloth_L4@>@Z@L@L@L@L@{@}
10 @$@<Sloth_L5@>@Z@L@L@L@L@L@{@}
11 @$@<Sloth_L6@>@Z@L@L@L@L@L@L@{@}
12 @$@<Sloth_L7@>@Z@L@L@L@L@L@L@L@{@}
13
14 2. Ensure that output macros can't also be library macros.
15
16 @O@<pr11.out@>@L@{@}
17
18 3. Ensure that you cannot define two macros with both the
19 same name and level. Ensure that this works for all levels.
20
21 @$@<Walrus_L0@>@Z@{@}
22 @$@<Walrus_L0@>@Z@{@}
23
24 @$@<Walrus_L1@>@Z@L@{@}
25 @$@<Walrus_L1@>@Z@L@{@}
26
27 @$@<Walrus_L2@>@Z@L@L@{@}
28 @$@<Walrus_L2@>@Z@L@L@{@}
29
30 @$@<Walrus_L3@>@Z@L@L@L@{@}
31 @$@<Walrus_L3@>@Z@L@L@L@{@}
32
33 @$@<Walrus_L4@>@Z@L@L@L@L@{@}
34 @$@<Walrus_L4@>@Z@L@L@L@L@{@}
35
36 @$@<Walrus_L5@>@Z@L@L@L@L@L@{@}
37 @$@<Walrus_L5@>@Z@L@L@L@L@L@{@}
38
39 4. Ensure that six identical levels can simultaneously exist.
40
41 @$@<Aardvark_L0@>@Z@{@}
42 @$@<Aardvark_L1@>@Z@L@{@}
43 @$@<Aardvark_L2@>@Z@L@L@{@}
44 @$@<Aardvark_L3@>@Z@L@L@L@{@}
45 @$@<Aardvark_L4@>@Z@L@L@L@L@{@}
46 @$@<Aardvark_L5@>@Z@L@L@L@L@L@{@}
47
48 5. Ensure that different levels can have different modifiers.
49
50 @$@<Emu@>@Z@M@{@}
51 @$@<Emu@>@Z@L@{@}
52
53 6. Ensure that different levels can have different parameter lists.
54
55 @$@<Wombat@>@(@3@)@Z@{@}
56 @$@<Wombat@>@(@1@)@Z@L@{@}
57
58 7. Ensure that different levels can have differently additive.
59
60 @$@<Penguin@>@Z==@{@}
61 @$@<Penguin@>@Z@L+=@{@}
62
63 End of library construct parser tests.