From: Frank Duncan Date: Sun, 1 May 2016 06:50:17 +0000 (-0500) Subject: Prims - Implement not X-Git-Tag: v0.1.0~27 X-Git-Url: https://code.consxy.com/gitweb/gitweb.cgi?a=commitdiff_plain;h=9d76751;p=clnl Prims - Implement not --- diff --git a/src/main/transpile.lisp b/src/main/transpile.lisp index 1d4a90c..86a5657 100644 --- a/src/main/transpile.lisp +++ b/src/main/transpile.lisp @@ -156,6 +156,7 @@ DESCRIPTION: (defagentvalueprim :label) (defagentvalueprim :label-color) (defsimpleprim :lt :command clnl-nvm:turn-left) +(defsimpleprim :not :reporter cl:not) (defkeywordprim :nobody) (defsimpleprim :one-of :reporter clnl-nvm:one-of) (defsimpleprim :of :reporter clnl-nvm:of) diff --git a/src/test/simpletests.lisp b/src/test/simpletests.lisp index 96ce890..5443673 100644 --- a/src/test/simpletests.lisp +++ b/src/test/simpletests.lisp @@ -135,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")