fix some 'unit' tests
svn: r9680
This commit is contained in:
parent
7a6642a9a8
commit
d597605d24
|
@ -1,5 +1,5 @@
|
||||||
(require-for-syntax (lib "unit-compiletime.ss" "mzlib" "private")
|
(require (for-syntax (lib "unit-compiletime.ss" "mzlib" "private")
|
||||||
(lib "unit-syntax.ss" "mzlib" "private"))
|
(lib "unit-syntax.ss" "mzlib" "private")))
|
||||||
(require "test-harness.ss"
|
(require "test-harness.ss"
|
||||||
(lib "unit-compiletime.ss" "mzlib" "private")
|
(lib "unit-compiletime.ss" "mzlib" "private")
|
||||||
(lib "unit-keywords.ss" "mzlib" "private")
|
(lib "unit-keywords.ss" "mzlib" "private")
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
(require-for-syntax (lib "unit-compiletime.ss" "mzlib" "private")
|
(require (for-syntax (lib "unit-compiletime.ss" "mzlib" "private")
|
||||||
(lib "unit-syntax.ss" "mzlib" "private"))
|
(lib "unit-syntax.ss" "mzlib" "private")))
|
||||||
(require "test-harness.ss"
|
(require "test-harness.ss"
|
||||||
;unit
|
;unit
|
||||||
mzlib/unit)
|
scheme/unit)
|
||||||
|
|
||||||
(define-syntax (lookup-sig-mac stx)
|
(define-syntax (lookup-sig-mac stx)
|
||||||
(parameterize ((error-syntax stx))
|
(parameterize ((error-syntax stx))
|
||||||
|
@ -1153,7 +1153,6 @@
|
||||||
(test-syntax-error "struct: bad omission"
|
(test-syntax-error "struct: bad omission"
|
||||||
(define-signature x ((struct n () x))))
|
(define-signature x ((struct n () x))))
|
||||||
|
|
||||||
(require mzlib/plt-match)
|
|
||||||
(let ()
|
(let ()
|
||||||
(define-signature sig ((struct s (x y))))
|
(define-signature sig ((struct s (x y))))
|
||||||
(test 3
|
(test 3
|
||||||
|
@ -1182,21 +1181,21 @@
|
||||||
(test #t (s? (make-s 1))))
|
(test #t (s? (make-s 1))))
|
||||||
|
|
||||||
(let ((set-s-x! 1))
|
(let ((set-s-x! 1))
|
||||||
(define-signature sig ((struct s (x y) -setters)))
|
(define-signature sig ((struct s (x y))))
|
||||||
(test 1
|
(test 1
|
||||||
(invoke-unit
|
(invoke-unit
|
||||||
(compound-unit (import) (export)
|
(compound-unit (import) (export)
|
||||||
(link (((S : sig)) (unit (import) (export sig) (define-struct s (x y))))
|
(link (((S : sig)) (unit (import) (export sig) (define-struct s (x y))))
|
||||||
(() (unit (import sig) (export)
|
(() (unit (import sig) (export)
|
||||||
set-s-x!) S))))))
|
set-s-x!) S))))))
|
||||||
(let ((s-x 1))
|
(let ((make-s 1))
|
||||||
(define-signature sig ((struct s (x y) -selectors)))
|
(define-signature sig ((struct s (x y) #:omit-constructor)))
|
||||||
(test 1
|
(test 1
|
||||||
(invoke-unit
|
(invoke-unit
|
||||||
(compound-unit (import) (export)
|
(compound-unit (import) (export)
|
||||||
(link (((S : sig)) (unit (import) (export sig) (define-struct s (x y))))
|
(link (((S : sig)) (unit (import) (export sig) (define-struct s (x y))))
|
||||||
(() (unit (import sig) (export)
|
(() (unit (import sig) (export)
|
||||||
s-x) S)))))))
|
make-s) S)))))))
|
||||||
|
|
||||||
;; Dependencies
|
;; Dependencies
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user