From c8d3836f56d8a281bd943d7765cfbc704e06d9b5 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Daniel=20Kochma=C5=84ski?= Date: Fri, 4 Sep 2015 21:05:24 +0200 Subject: [PATCH] infinity: add regression tests MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Daniel Kochmański --- src/tests/regressions/tests/compiler.lsp | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/src/tests/regressions/tests/compiler.lsp b/src/tests/regressions/tests/compiler.lsp index 4b01635..6e8c21e 100644 --- a/src/tests/regressions/tests/compiler.lsp +++ b/src/tests/regressions/tests/compiler.lsp @@ -1108,3 +1108,32 @@ 1 2 3 ") + + + +;;; Date: 2015-09-04 +;;; Fixed: Daniel Kochmański +;;; Description +;;; Compiler signalled arithmetic-error when producing C code for infinity +;;; and NaN float values (part of ieee floating point extensions). + +#+ieee-floating-point +(deftest compiler.0047.infinity-test.1 + (progn + (defun aux-compiler-0047.infty-test.1 () + (> 0.0 ext:single-float-negative-infinity)) + (compile 'aux-compiler-0047.infty-test.1)) + aux-compiler-0047.infty-test.1 NIL NIL) + +#+ieee-floating-point +(deftest compiler.0048.infinity-test.2 + (progn + (with-compiler ("aux-compiler-0048.infty-test.2.lsp") + '(defun doit () (> 0.0 ext:single-float-negative-infinity))) + (load "aux-compiler-0048.infty-test.2.fas") + (delete-file "aux-compiler-0048.infty-test.2.lsp") + (delete-file "aux-compiler-0048.infty-test.2.fas") + (doit)) + T) + + -- 2.9.0