Ticket #1614: test.patch

File test.patch, 627 bytes (added by sjamaan, 5 years ago)

Regression test

  • tests/compiler-tests.scm

    diff --git a/tests/compiler-tests.scm b/tests/compiler-tests.scm
    index 6e5c8b27..d4585e37 100644
    a b  
    6969(import x)
    7070(assert (= 1 ((bar 42))))
    7171
     72
     73;; Test custom foreign type conversions
     74
     75(module y (my-add1)
     76  (import scheme (chicken base) (chicken foreign))
     77
     78  (define-foreign-type my-int integer add1 sub1)
     79
     80  (define my-add1 (foreign-lambda* my-int ((my-int x)) "C_return(x+1);")))
     81
     82(import y)
     83(assert (= 2 (my-add1 1)))
     84
    7285;;; rev. 14574 (reported by Peter Bex)
    7386;
    7487; - type specifiers in foreign-lambda in macros are incorrectly renamed