X-Git-Url: https://code.consxy.com/gitweb/gitweb.cgi?a=blobdiff_plain;f=src%2Ftest%2Fsimpletests.lisp;h=5b6294f08f9d97d3036417a874efcf0928989e21;hb=9eef8ecae4fad1e01413807ebc80ae45b5990706;hp=7a362cd77d542a31343f1f9dc7bf537205e252a3;hpb=5a7fb5cf4e703d4cb8d6b89052265368323edd94;p=clnl diff --git a/src/test/simpletests.lisp b/src/test/simpletests.lisp index 7a362cd..5b6294f 100644 --- a/src/test/simpletests.lisp +++ b/src/test/simpletests.lisp @@ -15,6 +15,9 @@ (defsimplecommandtest "Simple crt and fd" "crt 5 ask turtles [ fd 1 ]" "BEB43404EDC7852985A9A7FC312481785FE553A0") +(defsimplecommandtest "Simple crt and fd 2" "crt 5 [ fd 1 ]" + "BEB43404EDC7852985A9A7FC312481785FE553A0") + (defsimplecommandtest "Wrapping 1" "crt 5 ask turtles [ fd 5 ]" "1098A56973DA04E7AEA7659C40E3FF3EC7862B02") @@ -132,6 +135,12 @@ (defsimplecommandtest "ifelse 2" "ifelse 5 = 4 [ crt 10 ] [ crt 5 ] if-else 5 = 4 [ crt 10 ] [ crt 5 ]" "A925E39EC022967568D238D31F70F0A375024A89") +(defsimplecommandtest "not 1" "if not (5 = 5) [ crt 10 ]" + "E1DE30F072D785E0D0B59F28B0F7853E3D3E0D8B") + +(defsimplecommandtest "not 2" "if not (5 = 4) [ crt 10 ]" + "A925E39EC022967568D238D31F70F0A375024A89") + (defsimplereportertest "colors 1" "green" "55" "E1DE30F072D785E0D0B59F28B0F7853E3D3E0D8B") @@ -147,7 +156,7 @@ (defsimplecommandtest "ticks 1" "reset-ticks tick" "E1DE30F072D785E0D0B59F28B0F7853E3D3E0D8B") -(defreportertestwithsetup "ticks 1" "reset-ticks tick tick" "ticks" "2" +(defreportertestwithsetup "ticks 2" "reset-ticks tick tick" "ticks" "2" "E1DE30F072D785E0D0B59F28B0F7853E3D3E0D8B") (defreportertestwithsetup "of / who 1" "crt 10" "[ who ] of turtles" "[5 9 4 3 7 0 1 2 6 8]" @@ -208,3 +217,26 @@ (defsimplereportertest "count 3" "count patches" "9" "E1DE30F072D785E0D0B59F28B0F7853E3D3E0D8B") + +(defreportertestwithsetup "with 1" + "crt 10 [ set color blue ] crt 10 [ set color green ]" "turtles with [ color = blue ]" + "(agentset, 10 turtles)" + "3FA51464CBF2AD493FA95A52E17768E1D8C8EFBB") + +(defreportertestwithsetup "with 2" + "crt 10 [ set color blue ] crt 10 [ set color green ]" "turtles with [ color = black ]" + "(agentset, 0 turtles)" + "3FA51464CBF2AD493FA95A52E17768E1D8C8EFBB") + +(defsimplereportertest "with 3" "patches with [ pcolor = green ]" + "(agentset, 0 patches)" + "E1DE30F072D785E0D0B59F28B0F7853E3D3E0D8B") + +(defsimplecommandtest "hatch 1" "crt 10 ask turtles [ hatch 1 ]" + "29E3D1D3FAA14FC0D6E03DB1315932EEBC7CB1F1") + +(defsimplecommandtest "hatch 2" "crt 10 ask turtles [ hatch 1 [ fd .5 ] ] ask turtles [ fd .5 ]" + "58E3CBC869F26B7D9ABC0C05C58C29F2FD588912") + +(defsimplecommandtest "set-default-shapes 1" "crt 10 set-default-shape turtles \"sheep\" crt 10" + "F0B80936630E8B597CB1088493E3765B5B4A2137")