[cmucl-commit] [git] CMU Common Lisp branch master updated. snapshot-2014-08-41-gd08b5bf
Raymond Toy
rtoy at common-lisp.net
Thu Aug 28 04:22:33 UTC 2014
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMU Common Lisp".
The branch, master has been updated
via d08b5bf8259bcd458beec17ba65a7b85f454edda (commit)
from b48c235255ef3e9cf0f47446a3adf8ce0abbe07f (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit d08b5bf8259bcd458beec17ba65a7b85f454edda
Author: Raymond Toy <toy.raymond at gmail.com>
Date: Wed Aug 27 21:22:18 2014 -0700
Add some tests for ROUND. Two tests currently fail.
diff --git a/tests/srctran.lisp b/tests/srctran.lisp
index f88e977..e3cba34 100644
--- a/tests/srctran.lisp
+++ b/tests/srctran.lisp
@@ -80,3 +80,25 @@
(c::ceiling-rem-bound (c::make-interval :low '(-1.3) :high 10.3)))
(assert-equalp (c::make-interval :low '(-20.3) :high '(20.3))
(c::ceiling-rem-bound (c::make-interval :low '(-20.3) :high 10.3))))
+
+(define-test round-quotient-bound
+ "Test the first value of ROUND returns the correct interval"
+ (assert-equalp (c::make-interval :low 0 :high 10)
+ (c::round-quotient-bound (c::make-interval :low 0.3 :high 10.5)))
+ (assert-equalp (c::make-interval :low 0 :high 12)
+ (c::round-quotient-bound (c::make-interval :low 0.3 :high 11.5)))
+ (assert-equalp (c::make-interval :low 0 :high 10)
+ (c::round-quotient-bound (c::make-interval :low 0.3 :high '(10.5))))
+ ;; Known failure: returns high limit of 12 instead of 11
+ (assert-equalp (c::make-interval :low 0 :high 11)
+ (c::round-quotient-bound (c::make-interval :low 0.3 :high '(11.5))))
+ (assert-equalp (c::make-interval :low 2 :high 10)
+ (c::round-quotient-bound (c::make-interval :low 1.5 :high 10.5)))
+ (assert-equalp (c::make-interval :low 2 :high 10)
+ (c::round-quotient-bound (c::make-interval :low '(1.5) :high 10.5)))
+ ;; Known failure: returns high limit of 0 instead of 1
+ (assert-equalp (c::make-interval :low 1 :high 10)
+ (c::round-quotient-bound (c::make-interval :low '(0.5) :high 10.5)))
+ )
+
+
\ No newline at end of file
-----------------------------------------------------------------------
Summary of changes:
tests/srctran.lisp | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
hooks/post-receive
--
CMU Common Lisp
More information about the cmucl-commit
mailing list