File: pr06.fw

package info (click to toggle)
funnelweb 3.2-4.2
  • links: PTS
  • area: main
  • in suites: wheezy
  • size: 2,744 kB
  • sloc: ansic: 9,156; makefile: 17
file content (39 lines) | stat: -rw-r--r-- 885 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
PR06: Test the parsing on invocation number constraints.

Trip the parser so we don't get past it.
@>

1. Test with no zero and no many.
@$@<Sloth@>@{No zero and no many in this macro@}

2. Test with a zero.
@$@<Sloth zero@>@Z@{Can be called from 0 to 1 times.@}

3. Test with a many.
@$@<Sloth many@>@M@{Can be called from 1 to infinity times.@}

4. Test with a zero and a many.
@$@<Sloth zeromany@>@Z@M@{Can be called from 0 to infinity times.@}

5. Test with a zero and a many but out of order (should give error).
@$@<Sloth manyzero@>@M@Z@{Oops.@}
@A@<Error recovery point@>

6. Test with syntactic errors.

@$@<Sloth a@> @M @Z @{Oops.@}
@A@<Error recovery point@>

@$@<Sloth b@>@Z@Z@{Oops.@}
@A@<Error recovery point@>

@$@<Sloth c@Z@>@{Oops.@}
@A@<Error recovery point@>

@$@<Sloth d@>Z@{Oops.@}
@A@<Error recovery point@>

@$@<Sloth d@>@ZM@{Oops.@}
@A@<Error recovery point@>