Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Increase integer test verbosity

  • Loading branch information...
commit d5892820d15775c4379ded54860c64d6874d3623 1 parent 1c5246a
Geert Janssens authored
Showing with 10 additions and 0 deletions.
  1. +10 −0 Examples/test-suite/schemerunme/integers.scm
10 Examples/test-suite/schemerunme/integers.scm
View
@@ -8,6 +8,8 @@
(define-macro (check-range function from to)
`(begin (check-equality (,function ,from) ,from)
+ (display "Max in guile: ")(display ,to)(newline)
+ (display "Max in c: ")(display (,function ,to))(newline)
(check-equality (,function ,to) ,to)
(check-equality (throws-exception? (,function (- ,from 1))) #t)
(check-equality (throws-exception? (,function (+ ,to 1))) #t)))
@@ -26,6 +28,14 @@
(unsigned-long-long-max (- (expt 2 (* (unsigned-long-long-size) 8)) 1))
)
+ (display "Signed short size: ")(display (signed-short-size))(newline)
+ (display "Unsigned short size: ")(display (unsigned-short-size))(newline)
+ (display "Signed int size: ")(display (signed-int-size))(newline)
+ (display "Unsigned int size: ")(display (unsigned-int-size))(newline)
+ (display "Signed long size: ")(display (signed-long-size))(newline)
+ (display "Unsigned long size: ")(display (unsigned-long-size))(newline)
+ (display "Signed llong size: ")(display (signed-long-long-size))(newline)
+ (display "Unsigned llong size: ")(display (unsigned-long-long-size))(newline)
;;; signed char, unsigned char typemaps deal with characters, not integers.
;; (check-range signed-char-identity (- (expt 2 7)) (- (expt 2 7) 1))
;; (check-range unsigned-char-identity 0 (- (expt 2 8) 1))
Please sign in to comment.
Something went wrong with that request. Please try again.