From 000c69e9042bab1735823e62870649603c077aa7 Mon Sep 17 00:00:00 2001 From: Alex Shinn Date: Thu, 24 Feb 2011 23:28:36 +0900 Subject: [PATCH] adding test-not --- lib/chibi/test.module | 2 +- lib/chibi/test.scm | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/chibi/test.module b/lib/chibi/test.module index d8b405f1..66e97d54 100644 --- a/lib/chibi/test.module +++ b/lib/chibi/test.module @@ -1,7 +1,7 @@ (define-module (chibi test) (export - test test-error test-assert test-values + test test-error test-assert test-not test-values test-group current-test-group test-begin test-end test-syntax-error test-info test-vars test-run ;;test-exit diff --git a/lib/chibi/test.scm b/lib/chibi/test.scm index bfa7429e..39939e8c 100644 --- a/lib/chibi/test.scm +++ b/lib/chibi/test.scm @@ -80,6 +80,11 @@ (test-syntax-error 'test-assert "1 or 2 arguments required" (test a ...))))) +(define-syntax test-not + (syntax-rules () + ((_ expr) (test-assert (not expr))) + ((_ name expr) (test-assert name (not expr))))) + (define-syntax test-values (syntax-rules () ((_ expect expr)