Prims - Implement agent variables, Implement of, who
[clnl] / src / test / simpletests.lisp
1 (in-package #:clnl-test)
2
3 (defsimplecommandtest "Nothing" ""
4  "E1DE30F072D785E0D0B59F28B0F7853E3D3E0D8B")
5
6 (defsimplecommandtest "Simple crt" "crt 1"
7  "2F08B31AC06C9D5339E6B3E953C2B4B71FDB9CDE")
8
9 (defsimplecommandtest "Simple crt 2" "crt 5"
10  "9FE588C2749CD9CE66CB0EA451EFB80476E881FB")
11
12 (defsimplecommandtest "Simple crt and fd random" "crt 30 ask turtles [ fd random-float 1 ]"
13  "DED34D1D6492244E9E3813DE8DBF258F96636879")
14
15 (defsimplecommandtest "Simple crt and fd" "crt 5 ask turtles [ fd 1 ]"
16  "BEB43404EDC7852985A9A7FC312481785FE553A0")
17
18 (defsimplecommandtest "Wrapping 1" "crt 5 ask turtles [ fd 5 ]"
19  "1098A56973DA04E7AEA7659C40E3FF3EC7862B02")
20
21 (defsimplecommandtest "Wrapping 2" "crt 5 ask turtles [ fd random-float 5 ]"
22  "1419DFA66EFB7F08FB30C7B63B256547212EB915")
23
24 (defsimplecommandtest "Wrapping 3" "crt 10 ask turtles [ fd -5 ]"
25  "53E4ECBD3C49FC8D3466563641CFCD7DCB5CD2AF")
26
27 (defsimplecommandtest "Wrapping 4" "crt 10 ask turtles [ fd random-float -5 ]"
28  "1258CE9CC93B52367E797F4C497BF95760EC7175")
29
30 (defsimplereportertest "Random 1" "random-float 5" "4.244088516651127"
31  "17D1BF7FF7BF2C7F3F5F7DD7CF67CFF2772CFFFC")
32
33 (defsimplereportertest "= 1" "5 = 5" "true"
34  "E1DE30F072D785E0D0B59F28B0F7853E3D3E0D8B")
35
36 (defsimplereportertest "= 2" "5 = 4" "false"
37  "E1DE30F072D785E0D0B59F28B0F7853E3D3E0D8B")
38
39 (defsimplereportertest "!= 1" "5 != 5" "false"
40  "E1DE30F072D785E0D0B59F28B0F7853E3D3E0D8B")
41
42 (defsimplereportertest "!= 2" "5 != 4" "true"
43  "E1DE30F072D785E0D0B59F28B0F7853E3D3E0D8B")
44
45 (defsimplereportertest "- 1" "5 - 5" "0"
46  "E1DE30F072D785E0D0B59F28B0F7853E3D3E0D8B")
47
48 (defsimplereportertest "- 2" "5 - 6" "-1"
49  "E1DE30F072D785E0D0B59F28B0F7853E3D3E0D8B")
50
51 (defsimplereportertest "- 3" "random-float 5 - random-float 5" "3.349608870016444"
52  "811837B74F63D10ABBC01DD59C1E7556706D9F7A")
53
54 (defsimplereportertest "+ 1" "5 + 5" "10"
55  "E1DE30F072D785E0D0B59F28B0F7853E3D3E0D8B")
56
57 (defsimplereportertest "+ 2" "5 + -6" "-1"
58  "E1DE30F072D785E0D0B59F28B0F7853E3D3E0D8B")
59
60 (defsimplereportertest "+ 3" "random-float 6 + random-float 6" "6.166281795942972"
61  "811837B74F63D10ABBC01DD59C1E7556706D9F7A")
62
63 (defsimplereportertest "* 1" "5 * 5" "25"
64  "E1DE30F072D785E0D0B59F28B0F7853E3D3E0D8B")
65
66 (defsimplereportertest "* 2" "5 * -6" "-30"
67  "E1DE30F072D785E0D0B59F28B0F7853E3D3E0D8B")
68
69 (defsimplereportertest "* 3" "random-float 4 * random-float 7" "4.251800892259665"
70  "811837B74F63D10ABBC01DD59C1E7556706D9F7A")
71
72 (defsimplereportertest "/ 1" "5 / 5" "1"
73  "E1DE30F072D785E0D0B59F28B0F7853E3D3E0D8B")
74
75 (defsimplereportertest "/ 2" "5 / -6" "-0.8333333333333334"
76  "E1DE30F072D785E0D0B59F28B0F7853E3D3E0D8B")
77
78 (defsimplereportertest "/ 3" "random-float 4 / random-float 7" "2.7112896835726876"
79  "811837B74F63D10ABBC01DD59C1E7556706D9F7A")
80
81 (defsimplereportertest "< 1" "5 < 5" "false"
82  "E1DE30F072D785E0D0B59F28B0F7853E3D3E0D8B")
83
84 (defsimplereportertest "< 2" "5 < 6" "true"
85  "E1DE30F072D785E0D0B59F28B0F7853E3D3E0D8B")
86
87 (defsimplereportertest "< 3" "random-float 4 < random-float 7" "false"
88  "811837B74F63D10ABBC01DD59C1E7556706D9F7A")
89
90 (defsimplereportertest "<= 1" "5 <= 5" "true"
91  "E1DE30F072D785E0D0B59F28B0F7853E3D3E0D8B")
92
93 (defsimplereportertest "<= 2" "5 <= 6" "true"
94  "E1DE30F072D785E0D0B59F28B0F7853E3D3E0D8B")
95
96 (defsimplereportertest "<= 3" "random-float 4 <= random-float 7" "false"
97  "811837B74F63D10ABBC01DD59C1E7556706D9F7A")
98
99 (defsimplereportertest "any? 1" "any? turtles" "false"
100  "E1DE30F072D785E0D0B59F28B0F7853E3D3E0D8B")
101
102 (defreportertestwithsetup "any? 2" "crt 10" "any? turtles" "true"
103  "A925E39EC022967568D238D31F70F0A375024A89")
104
105 (defsimplecommandtest "die 1" "crt 10 ask turtles [ die ]"
106  "A665C1BF95E1F9CAAE9B9F8B2FBE3DAA45453136")
107
108 (defreportertestwithsetup "any? 3" "crt 10 ask turtles [ die ]" "any? turtles" "false"
109  "A665C1BF95E1F9CAAE9B9F8B2FBE3DAA45453136")
110
111 (defsimplecommandtest "rt 1" "crt 100 ask turtles [ fd random-float 5 rt random-float 180 fd random-float 4 ]"
112  "186B05DEFF6771BE791D54AB36A36874EC6E04FE")
113
114 (defsimplecommandtest "rt 2" "crt 100 ask turtles [ fd random-float 5 rt random-float 1080 fd random-float 4 ]"
115  "154C05DF7810C0FF5D7DDE51B76E1012FFB2C0E1")
116
117 (defsimplecommandtest "lt 1" "crt 100 ask turtles [ fd random-float 5 lt random-float 180 fd random-float 4 ]"
118  "D4B3844FE453C05E57537D6BA94C4B42C84655C6")
119
120 (defsimplecommandtest "lt 2" "crt 100 ask turtles [ fd random-float 5 lt random-float 1080 fd random-float 4 ]"
121  "07DEB6F4F007DB86CD8F2C2E10BD4E35CAD2B0CE")
122
123 (defsimplecommandtest "if 1" "if 5 = 5 [ crt 10 ]"
124  "A925E39EC022967568D238D31F70F0A375024A89")
125
126 (defsimplecommandtest "if 2" "if 5 = 4 [ crt 10 ]"
127  "E1DE30F072D785E0D0B59F28B0F7853E3D3E0D8B")
128
129 (defsimplecommandtest "ifelse 1" "ifelse 5 = 5 [ crt 10 ] [crt 5 ] if-else 5 = 5 [ crt 10 ] [ crt 5 ]"
130  "2CF70DC9135754E77B64422C10E947E776E731E6")
131
132 (defsimplecommandtest "ifelse 2" "ifelse 5 = 4 [ crt 10 ] [ crt 5 ] if-else 5 = 4 [ crt 10 ] [ crt 5 ]"
133  "A925E39EC022967568D238D31F70F0A375024A89")
134
135 (defsimplereportertest "colors 1" "green" "55"
136  "E1DE30F072D785E0D0B59F28B0F7853E3D3E0D8B")
137
138 (defsimplereportertest "colors 2" "black" "0"
139  "E1DE30F072D785E0D0B59F28B0F7853E3D3E0D8B")
140
141 (defsimplecommandtest "let 1" "let a 5 crt a"
142  "9FE588C2749CD9CE66CB0EA451EFB80476E881FB")
143
144 (defsimplecommandtest "let 2" "let a 5 let b 6 crt (a + b)"
145  "4ABB6822402929878AB9E5A1084B9E4AE1F01D5B")
146
147 (defsimplecommandtest "ticks 1" "reset-ticks tick"
148  "E1DE30F072D785E0D0B59F28B0F7853E3D3E0D8B")
149
150 (defreportertestwithsetup "ticks 1" "reset-ticks tick tick" "ticks" "2"
151  "E1DE30F072D785E0D0B59F28B0F7853E3D3E0D8B")
152
153 (defreportertestwithsetup "of / who 1" "crt 10" "[ who ] of turtles" "[5 9 4 3 7 0 1 2 6 8]"
154  "3F39BD2D8D5A1B2333E6C0DB665DBE3DCD5A75CE")