git @ Cat's Eye Technologies Unlikely / rel_1_0_2014_0819
Add rudimentary Falderal tests, test driver, .{hg,git}ignore. Cat's Eye Technologies 10 years ago
4 changed file(s) with 56 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
0 *.pyc
0 syntax: glob
1
2 *.pyc
0 #!/bin/sh
1
2 falderal --substring-error tests/Unlikely.markdown
0 Tests for Unlikely
1 ==================
2
3 -> Tests for functionality "Parse Unlikely Program"
4
5 -> Functionality "Parse Unlikely Program" is implemented by
6 -> shell command
7 -> "python src/coldwater.py %(test-body-file)"
8
9 Here is a syntactically correct program.
10
11 | class Count(Count,Chain,Print,Add) extends Continuation
12 |
13 | class CountForever(Count,Chain,Print,Add) extends Program {
14 | Count c;
15 | method continue(Passive accumulator) {
16 | c = new Count(Passive,Count,Chain,Print,Add);
17 | goto c.continue(new 1(Passive));
18 | }
19 | }
20 |
21 | class Count() extends Continuation {
22 | Count c;
23 | Print p;
24 | Add a;
25 | method continue(Passive accumulator) {
26 | c = new Count(Passive,Count,Chain,Print,Add);
27 | a = new Add(Passive,Chain);
28 | a.value = new 1(Passive);
29 | a.next = c;
30 | p = new Print(Passive,Chain);
31 | p.next = a;
32 | goto p.continue(accumulator);
33 | }
34 | }
35 |
36 =
37
38 And here is one which is not syntactically correct.
39
40 | class Hello(Print,Chain,Stop) extends Program {
41 | Print p;
42 | method continue(accumulator) {
43 | p = new Print(Passive,Chain);
44 | p.next = new Stop(Passive);
45 | goto p.continue(new "Hello, world!"(Passive));
46 | }
47 | }
48 ? ArtefactNotFoundError