[Git][cmucl/cmucl][issue-290-pprint-with-float-traps] Use simpler forms for tests
Raymond Toy pushed to branch issue-290-pprint-with-float-traps at cmucl / cmucl Commits: 83778858 by Raymond Toy at 2024-03-25T07:14:46-07:00 Use simpler forms for tests Don't use a real example for the tests; replace the body with a simple print to reduce the chance of failures due to other pprint changes. - - - - - 1 changed file: - tests/pprint.lisp Changes: ===================================== tests/pprint.lisp ===================================== @@ -10,21 +10,10 @@ (assert-equal " (WITH-FLOAT-TRAPS-MASKED (:UNDERFLOW) - (LET* ((RATIO - (/ (* (EXPT 10 PPRINT-TESTS::EXPONENT) NUMBER) - PPRINT-TESTS::DIVISOR)) - (PPRINT-TESTS::RESULT (COERCE RATIO PPRINT-TESTS::FLOAT-FORMAT))) - (WHEN (AND (ZEROP PPRINT-TESTS::RESULT) (NOT (ZEROP NUMBER))) - (ERROR \"Underflow\")) - PPRINT-TESTS::RESULT))" + (PRINT \"Hello\"))" (with-output-to-string (s) (pprint '(ext:with-float-traps-masked (:underflow) - (let* ((ratio (/ (* (expt 10 exponent) number) - divisor)) - (result (coerce ratio float-format))) - (when (and (zerop result) (not (zerop number))) - (error "Underflow")) - result)) + (print "Hello")) s)))) (define-test pprint.with-float-traps-enabled @@ -32,22 +21,8 @@ (assert-equal " (WITH-FLOAT-TRAPS-ENABLED (:UNDERFLOW) - (LET* ((RATIO - (/ (* (EXPT 10 PPRINT-TESTS::EXPONENT) NUMBER) - PPRINT-TESTS::DIVISOR)) - (PPRINT-TESTS::RESULT (COERCE RATIO PPRINT-TESTS::FLOAT-FORMAT))) - (WHEN (AND (ZEROP PPRINT-TESTS::RESULT) (NOT (ZEROP NUMBER))) - (ERROR \"Underflow\")) - PPRINT-TESTS::RESULT))" + (PRINT \"Hello\"))" (with-output-to-string (s) (pprint '(ext:with-float-traps-enabled (:underflow) - (let* ((ratio (/ (* (expt 10 exponent) number) - divisor)) - (result (coerce ratio float-format))) - (when (and (zerop result) (not (zerop number))) - (error "Underflow")) - result)) + (print "Hello")) s)))) - - - View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/commit/8377885822cc4d08f760b542... -- View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/commit/8377885822cc4d08f760b542... You're receiving this email because of your account on gitlab.common-lisp.net.
participants (1)
-
Raymond Toy (@rtoy)