From: Taylor R Campbell Date: Sat, 8 Dec 2018 06:12:18 +0000 (+0000) Subject: Add cross-compilation test. X-Git-Tag: mit-scheme-pucked-10.1.9~3^2~35^2~59 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=a00b5ad66ce479cdce84d617f14fcd3d5a8f746c;p=mit-scheme.git Add cross-compilation test. --- diff --git a/tests/compiler/test-toplev.scm b/tests/compiler/test-toplev.scm index 4a047a9a8..61a7e5922 100644 --- a/tests/compiler/test-toplev.scm +++ b/tests/compiler/test-toplev.scm @@ -41,4 +41,22 @@ USA. (compiled-expression (compile-scode scode)) (procedure (eval compiled-expression test-env))) (assert-compiled-procedure procedure) + (assert-eqv (procedure 123.) 247.)))) + +(define-test 'cross-example-with-flonum-data + (lambda () + ;; XXX whattakludge + (define finish-cross-compilation:scode + (let ((env (make-top-level-environment))) + (load "../src/compiler/base/crsend" env) + (eval 'finish-cross-compilation:scode env))) + (let* ((code '(lambda (x) (flo:+ (flo:* 2. x) 1.))) + (scode (syntax&integrate code '((usual-integrations)) test-env)) + (cross-compilation + (fluid-let ((compiler:cross-compiling? #t)) + (compile-scode scode))) + (compiled-expression + (finish-cross-compilation:scode cross-compilation)) + (procedure (eval compiled-expression test-env))) + (assert-compiled-procedure procedure) (assert-eqv (procedure 123.) 247.)))) \ No newline at end of file