Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Switch to Eos for the test driver

  • Loading branch information...
commit 48276ba478c6a753dbdffcec458df97533f4edda 1 parent 6003349
@marijnh authored
Showing with 18 additions and 20 deletions.
  1. +1 −1  ieee-floats.asd
  2. +17 −19 tests.lisp
View
2  ieee-floats.asd
@@ -6,5 +6,5 @@
:components ((:file "ieee-floats")))
(defsystem :ieee-floats-tests
- :depends-on (:ieee-floats :fiveam)
+ :depends-on (:ieee-floats :eos)
:components ((:file "tests")))
View
36 tests.lisp
@@ -1,9 +1,9 @@
(defpackage :ieee-floats-tests
- (:use :common-lisp :ieee-floats :fiveam))
+ (:use :common-lisp :ieee-floats :Eos))
(in-package :ieee-floats-tests)
-;; After loading, run the tests with (fiveam:run! :ieee-floats)
+;; After loading, run the tests with (Eos:run! :ieee-floats)
;; The tiny-XX tests will error on systems that do not support 64-bit
;; floats, CLISP is one of those.
@@ -16,9 +16,9 @@
:collect `(is (eql ,float (,decode ,bits)))
:collect `(is (eql ,bits (,encode ,float))))))
-(def-fixture special-converters ()
- (make-float-converters encode-float64* decode-float64* 11 52 t)
- (make-float-converters encode-float32* decode-float32* 8 23 t))
+(make-float-converters encode-float64* decode-float64* 11 52 t)
+(make-float-converters encode-float32* decode-float32* 8 23 t)
+(make-float-converters encode-float16 decode-float16 5 10 nil)
(test sanity-32
(pairs-correspond decode-float32 encode-float32
@@ -41,13 +41,12 @@
(encode-float32 1.0d60)))
(test specials-32
- (with-fixture special-converters ()
- (pairs-correspond decode-float32* encode-float32*
- (5.0e2 #b01000011111110100000000000000000)
- (-5.0e-2 #b10111101010011001100110011001101)
- (:not-a-number #b01111111100000000000000000000001)
- (:positive-infinity #b01111111100000000000000000000000)
- (:negative-infinity #b11111111100000000000000000000000))))
+ (pairs-correspond decode-float32* encode-float32*
+ (5.0e2 #b01000011111110100000000000000000)
+ (-5.0e-2 #b10111101010011001100110011001101)
+ (:not-a-number #b01111111100000000000000000000001)
+ (:positive-infinity #b01111111100000000000000000000000)
+ (:negative-infinity #b11111111100000000000000000000000)))
(test sanity-64
(pairs-correspond decode-float64 encode-float64
@@ -61,10 +60,9 @@
(4.1995579896505956d-322 #b0000000000000000000000000000000000000000000000000000000001010101)))
(test specials-64
- (with-fixture special-converters ()
- (pairs-correspond decode-float64* encode-float64*
- (42d42 #b0100100011111110001000100010111010000010011001101101001001111111)
- (-42d42 #b1100100011111110001000100010111010000010011001101101001001111111)
- (:not-a-number #b0111111111110000000000000000000000000000000000000000000000000001)
- (:positive-infinity #b0111111111110000000000000000000000000000000000000000000000000000)
- (:negative-infinity #b1111111111110000000000000000000000000000000000000000000000000000))))
+ (pairs-correspond decode-float64* encode-float64*
+ (42d42 #b0100100011111110001000100010111010000010011001101101001001111111)
+ (-42d42 #b1100100011111110001000100010111010000010011001101101001001111111)
+ (:not-a-number #b0111111111110000000000000000000000000000000000000000000000000001)
+ (:positive-infinity #b0111111111110000000000000000000000000000000000000000000000000000)
+ (:negative-infinity #b1111111111110000000000000000000000000000000000000000000000000000)))
Please sign in to comment.
Something went wrong with that request. Please try again.