From: Frank Duncan Date: Sun, 24 Apr 2016 02:32:23 +0000 (-0500) Subject: Prims - Implement <, <= X-Git-Tag: v0.1.0~46 X-Git-Url: https://code.consxy.com/gitweb/gitweb.cgi?a=commitdiff_plain;h=aac9bb3;p=clnl Prims - Implement <, <= --- diff --git a/src/main/transpile.lisp b/src/main/transpile.lisp index d3f9612..b6e494c 100644 --- a/src/main/transpile.lisp +++ b/src/main/transpile.lisp @@ -78,6 +78,8 @@ DESCRIPTION: (defsimpleprim := :reporter cl:equalp) (defprim :!= :reporter (lambda (a b) `(not (equalp ,a ,b)))) +(defsimpleprim :<= :reporter cl:<=) +(defsimpleprim :< :reporter cl:<) (defsimpleprim :- :reporter cl:-) (defsimpleprim :+ :reporter cl:+) (defsimpleprim :* :reporter cl:*) diff --git a/src/test/simpletests.lisp b/src/test/simpletests.lisp index c3796ec..0acddfe 100644 --- a/src/test/simpletests.lisp +++ b/src/test/simpletests.lisp @@ -77,3 +77,21 @@ (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")