xref: /titanic_51/usr/src/common/ficl/test/testcase.fr (revision a1bf3f785ae05c419b339c3a2061f2b18c024f61)
1*a1bf3f78SToomas Soome
2*a1bf3f78SToomas Soome
3*a1bf3f78SToomas Soome1 2 3
4*a1bf3f78SToomas Soome.s-simple
5*a1bf3f78SToomas Soomecr
6*a1bf3f78SToomas Soome
7*a1bf3f78SToomas Soome: test-case ( n -- )
8*a1bf3f78SToomas Soome	case
9*a1bf3f78SToomas Soome		0 of
10*a1bf3f78SToomas Soome			." zero"
11*a1bf3f78SToomas Soome			endof
12*a1bf3f78SToomas Soome		1 of
13*a1bf3f78SToomas Soome			." one"
14*a1bf3f78SToomas Soome			endof
15*a1bf3f78SToomas Soome		." something else"
16*a1bf3f78SToomas Soome	endcase
17*a1bf3f78SToomas Soome	cr
18*a1bf3f78SToomas Soome	;
19*a1bf3f78SToomas Soome
20*a1bf3f78SToomas Soome
21*a1bf3f78SToomas Soomesee test-case
22*a1bf3f78SToomas Soome
23*a1bf3f78SToomas Soome.( You should see [3] 1 2 3 -> )
24*a1bf3f78SToomas Soome.s-simple
25*a1bf3f78SToomas Soome.( <-) cr
26*a1bf3f78SToomas Soome
27*a1bf3f78SToomas Soome.( You should see "zero": )
28*a1bf3f78SToomas Soome0 test-case
29*a1bf3f78SToomas Soome
30*a1bf3f78SToomas Soome.( You should see "one": )
31*a1bf3f78SToomas Soome1 test-case
32*a1bf3f78SToomas Soome
33*a1bf3f78SToomas Soome.( You should see "something else": )
34*a1bf3f78SToomas Soome324 test-case
35*a1bf3f78SToomas Soome
36*a1bf3f78SToomas Soome.( You should still see [3] 1 2 3 -> )
37*a1bf3f78SToomas Soome.s-simple
38*a1bf3f78SToomas Soome.( <-) cr
39*a1bf3f78SToomas Soome
40*a1bf3f78SToomas Soome
41*a1bf3f78SToomas Soome: test-case-2 ( n -- )
42*a1bf3f78SToomas Soome	case
43*a1bf3f78SToomas Soome		0 of
44*a1bf3f78SToomas Soome			." zero"
45*a1bf3f78SToomas Soome			fallthrough
46*a1bf3f78SToomas Soome		1 of
47*a1bf3f78SToomas Soome			." one"
48*a1bf3f78SToomas Soome			endof
49*a1bf3f78SToomas Soome		2 of
50*a1bf3f78SToomas Soome			." two"
51*a1bf3f78SToomas Soome			fallthrough
52*a1bf3f78SToomas Soome		." something else"
53*a1bf3f78SToomas Soome	endcase
54*a1bf3f78SToomas Soome	cr
55*a1bf3f78SToomas Soome	;
56*a1bf3f78SToomas Soome
57*a1bf3f78SToomas Soome
58*a1bf3f78SToomas Soomesee test-case-2
59*a1bf3f78SToomas Soome
60*a1bf3f78SToomas Soomecr
61*a1bf3f78SToomas Soome
62*a1bf3f78SToomas Soome.( You should once more see [3] 1 2 3 -> )
63*a1bf3f78SToomas Soome.s-simple
64*a1bf3f78SToomas Soome.( <-) cr
65*a1bf3f78SToomas Soome
66*a1bf3f78SToomas Soome.( You should see "zeroone": )
67*a1bf3f78SToomas Soome0 test-case-2
68*a1bf3f78SToomas Soome
69*a1bf3f78SToomas Soome.( You should see "one": )
70*a1bf3f78SToomas Soome1 test-case-2
71*a1bf3f78SToomas Soome
72*a1bf3f78SToomas Soome.( You should see "two": )
73*a1bf3f78SToomas Soome2 test-case-2
74*a1bf3f78SToomas Soome
75*a1bf3f78SToomas Soome.( You should see "something else": )
76*a1bf3f78SToomas Soome324 test-case-2
77*a1bf3f78SToomas Soome
78*a1bf3f78SToomas Soome.( You should still see [3] 1 2 3 -> )
79*a1bf3f78SToomas Soome.s-simple
80*a1bf3f78SToomas Soome.( <-) cr
81*a1bf3f78SToomas Soome
82*a1bf3f78SToomas Soome
83*a1bf3f78SToomas Soome
84*a1bf3f78SToomas Soomebye
85