Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Added test for limits.

  • Loading branch information...
commit 7ba3ae569ee9611cab4b597444ed4a876979c51f 1 parent c99c7c7
@tpapp authored
Showing with 7 additions and 1 deletion.
  1. +7 −1 tests/statistics.lisp
View
8 tests/statistics.lisp
@@ -122,9 +122,14 @@
(addtest (statistics-tests)
(let+ ((end 5)
+ (index 0) ; to make sure we have 1 of each
(pairs (filled-array 100
(lambda ()
- (@ (random 100d0) (random end)))))
+ (prog1 (@ (random 100d0)
+ (if (< index end)
+ index
+ (random end)))
+ (incf index)))))
(acc #'mean-sse-accumulator)
(result (sweep (sparse-accumulator-array 1 acc) pairs))
(*lift-equality-test* #'==)
@@ -136,6 +141,7 @@
pairs)
(when (plusp (tally accumulator))
accumulator))))
+ (ensure-same (limits result) (vector `(0 . ,end)))
(loop for i below end do
(ensure-same (ref result i) (sparse-acc pairs (funcall acc) i)))))
Please sign in to comment.
Something went wrong with that request. Please try again.