Rename common-lisp directory to lisp
I could have renamed common-lisp to common_lisp. I think Nix prefers underscores to hyphens.
This commit is contained in:
parent
6108f8df01
commit
b6fa3941b3
4 changed files with 1 additions and 0 deletions
16
lisp/default.nix
Normal file
16
lisp/default.nix
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
{ depot ? import <depot> {},
|
||||
universe ? import <universe> {},
|
||||
...
|
||||
}:
|
||||
|
||||
depot.nix.buildLisp.program {
|
||||
name = "unit-testing";
|
||||
|
||||
deps = with universe.third_party.lisp; [
|
||||
prove
|
||||
];
|
||||
|
||||
srcs = [
|
||||
./unit-testing.lisp
|
||||
];
|
||||
}
|
||||
15
lisp/main.lisp
Normal file
15
lisp/main.lisp
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
(in-package #:cl-user)
|
||||
(defpackage #:utils
|
||||
(:documentation "Some utility functions and macros to wet my beak.")
|
||||
(:use #:cl)
|
||||
(:shadow #:type))
|
||||
(in-package #:utils)
|
||||
|
||||
(defmacro type (name in out)
|
||||
`(declaim (ftype (function ,in ,out) ,name)))
|
||||
|
||||
(defmacro comment (&rest _forms) nil)
|
||||
|
||||
(type add (int int) int)
|
||||
(defun add (a b)
|
||||
(+ a b))
|
||||
13
lisp/unit-testing.lisp
Normal file
13
lisp/unit-testing.lisp
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
(in-package #:cl-user)
|
||||
(defpackage #:my-test
|
||||
(:documentation "Unit testing in Common Lisp.")
|
||||
(:use #:cl))
|
||||
(in-package #:my-test)
|
||||
|
||||
(plan 3)
|
||||
|
||||
(ok (not (find 4 '(1 2 3))))
|
||||
(is 4 4)
|
||||
(isnt 1 #\1)
|
||||
|
||||
(finalize)
|
||||
Loading…
Add table
Add a link
Reference in a new issue