Initial commit, add system, sources and tests.
[counted-feature-tests.git] / tests.lisp
1 ;;; -*- mode: lisp; syntax: common-lisp; coding: utf-8; package: cl-user; -*-
2
3 (in-package #:cl-user)
4
5 (defpackage #:counted-feature-tests-tests
6   (:use #:cl #:counted-feature-tests #:fiveam))
7
8 (in-package #:counted-feature-tests-tests)
9
10 (file-enable-counted-feature-tests-syntax)
11
12 (def-suite counted-feature-tests)
13
14 (in-suite counted-feature-tests)
15
16 (def-test useless.zero ()
17   "Zero prefix is no-op."
18   (is (eq 'useless #0+is 'useless)))
19
20 (def-test or-other-stuff ()
21   "Always skip next two forms with (OR)."
22   (is (equal '(other stuff)
23              (list #2+(or) :a-keyword-argument and-its-value
24                    'other 'stuff))))
25
26 (def-test useless.and ()
27   "Always read next form with (AND) and one prefix."
28   (is (eql 42 #1+(and) 42)))