X-Git-Url: https://code.consxy.com/gitweb/gitweb.cgi?a=blobdiff_plain;f=src%2Ftest%2Fsimpletests.lisp;h=9feaf8db4c2e4c3ccfe061688d1c8db6cbefd301;hb=2c338ef0bdabd1e327bbf474221239c2eead88e4;hp=54847ef97e5c2f13cef527e15b4d64fdbbfbdb3d;hpb=c694b81209acefe5da4571fd693bc1343a972fbe;p=clnl diff --git a/src/test/simpletests.lisp b/src/test/simpletests.lisp index 54847ef..9feaf8d 100644 --- a/src/test/simpletests.lisp +++ b/src/test/simpletests.lisp @@ -41,3 +41,81 @@ (defsimplereportertest "!= 2" "5 != 4" "true" "E1DE30F072D785E0D0B59F28B0F7853E3D3E0D8B") + +(defsimplereportertest "- 1" "5 - 5" "0" + "E1DE30F072D785E0D0B59F28B0F7853E3D3E0D8B") + +(defsimplereportertest "- 2" "5 - 6" "-1" + "E1DE30F072D785E0D0B59F28B0F7853E3D3E0D8B") + +(defsimplereportertest "- 3" "random-float 5 - random-float 5" "3.349608870016444" + "811837B74F63D10ABBC01DD59C1E7556706D9F7A") + +(defsimplereportertest "+ 1" "5 + 5" "10" + "E1DE30F072D785E0D0B59F28B0F7853E3D3E0D8B") + +(defsimplereportertest "+ 2" "5 + -6" "-1" + "E1DE30F072D785E0D0B59F28B0F7853E3D3E0D8B") + +(defsimplereportertest "+ 3" "random-float 6 + random-float 6" "6.166281795942972" + "811837B74F63D10ABBC01DD59C1E7556706D9F7A") + +(defsimplereportertest "* 1" "5 * 5" "25" + "E1DE30F072D785E0D0B59F28B0F7853E3D3E0D8B") + +(defsimplereportertest "* 2" "5 * -6" "-30" + "E1DE30F072D785E0D0B59F28B0F7853E3D3E0D8B") + +(defsimplereportertest "* 3" "random-float 4 * random-float 7" "4.251800892259665" + "811837B74F63D10ABBC01DD59C1E7556706D9F7A") + +(defsimplereportertest "/ 1" "5 / 5" "1" + "E1DE30F072D785E0D0B59F28B0F7853E3D3E0D8B") + +(defsimplereportertest "/ 2" "5 / -6" "-0.8333333333333334" + "E1DE30F072D785E0D0B59F28B0F7853E3D3E0D8B") + +(defsimplereportertest "/ 3" "random-float 4 / random-float 7" "2.7112896835726876" + "811837B74F63D10ABBC01DD59C1E7556706D9F7A") + +(defsimplereportertest "< 1" "5 < 5" "false" + "E1DE30F072D785E0D0B59F28B0F7853E3D3E0D8B") + +(defsimplereportertest "< 2" "5 < 6" "true" + "E1DE30F072D785E0D0B59F28B0F7853E3D3E0D8B") + +(defsimplereportertest "< 3" "random-float 4 < random-float 7" "false" + "811837B74F63D10ABBC01DD59C1E7556706D9F7A") + +(defsimplereportertest "<= 1" "5 <= 5" "true" + "E1DE30F072D785E0D0B59F28B0F7853E3D3E0D8B") + +(defsimplereportertest "<= 2" "5 <= 6" "true" + "E1DE30F072D785E0D0B59F28B0F7853E3D3E0D8B") + +(defsimplereportertest "<= 3" "random-float 4 <= random-float 7" "false" + "811837B74F63D10ABBC01DD59C1E7556706D9F7A") + +(defsimplereportertest "any? 1" "any? turtles" "false" + "E1DE30F072D785E0D0B59F28B0F7853E3D3E0D8B") + +(defreportertestwithsetup "any? 2" "crt 10" "any? turtles" "true" + "A925E39EC022967568D238D31F70F0A375024A89") + +(defsimplecommandtest "die 1" "crt 10 ask turtles [ die ]" + "A665C1BF95E1F9CAAE9B9F8B2FBE3DAA45453136") + +(defreportertestwithsetup "any? 3" "crt 10 ask turtles [ die ]" "any? turtles" "false" + "A665C1BF95E1F9CAAE9B9F8B2FBE3DAA45453136") + +(defsimplecommandtest "rt 1" "crt 100 ask turtles [ fd random-float 5 rt random-float 180 fd random-float 4 ]" + "186B05DEFF6771BE791D54AB36A36874EC6E04FE") + +(defsimplecommandtest "rt 2" "crt 100 ask turtles [ fd random-float 5 rt random-float 1080 fd random-float 4 ]" + "154C05DF7810C0FF5D7DDE51B76E1012FFB2C0E1") + +(defsimplecommandtest "lt 1" "crt 100 ask turtles [ fd random-float 5 lt random-float 180 fd random-float 4 ]" + "D4B3844FE453C05E57537D6BA94C4B42C84655C6") + +(defsimplecommandtest "lt 2" "crt 100 ask turtles [ fd random-float 5 lt random-float 1080 fd random-float 4 ]" + "07DEB6F4F007DB86CD8F2C2E10BD4E35CAD2B0CE")