Skip to content

Commit

Permalink
Use better lisp'isms, and don't rely on scoped variables
Browse files Browse the repository at this point in the history
  • Loading branch information
aw committed May 15, 2015
1 parent 117f922 commit 3692376
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions reporters/default.l
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@
" failed"
(colour) )

(report-failed)
(exit-gracefully) ]
(report-failed Failed_results)
(exit-gracefully Failed_results) ]

[de print-passed @
(prinl (colour "green")
Expand All @@ -45,14 +45,14 @@
(colour)
(next) ) ]

[de print-failed (Message Expected Result)
[de print-failed (Message)
(prinl (colour "red")
(char (hex "2715"))
(align 2 " ")
Message
(colour) ]

(de report-failed ()
(de report-failed (Failed_results)
(when Failed_results
(prinl "^J" (colour "red") "^J Failed test" (plural? Failed_results) ": ")

Expand Down Expand Up @@ -89,7 +89,7 @@
(println Result)
(colour) ]

[de exit-gracefully ()
[de exit-gracefully (Failed_results)
(if Failed_results
(bye 1)
(bye) ]
2 changes: 1 addition & 1 deletion unit.l
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
NIL ]

[de plural? (String)
(when (not (= (length String) 1)) "s") ]
(unless (= (length String) 1) "s") ]

(de get-results (Type)
(filter '((N) (= Type (car N))) *Results) )
Expand Down

0 comments on commit 3692376

Please sign in to comment.