Changeset 37617 in project


Ignore:
Timestamp:
05/25/19 10:51:57 (3 weeks ago)
Author:
sjamaan
Message:

matchable: Add failing test for record type setter using @ notation (which works in Gauche)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • release/5/matchable/trunk/tests/run.scm

    r37616 r37617  
    110110
    111111  (define-record point x y)
    112   (define-record-type my-box (make-my-box x) box? (x get-my-box-x))
     112  (define-record-type my-box
     113    (make-my-box x)
     114    box?
     115    (x get-my-box-x set-my-box-x!))
    113116
    114117  (test "toplevel record using raw name"
     
    158161        (let ((p (make-point 123 456)))
    159162          (match p (($ point x (set! y)) (y 789)))
    160           (list (point-x p) (point-y p)))))
     163          (list (point-x p) (point-y p))))
     164
     165  (test-error "record setter with @ pattern should fail"
     166              (match (make-my-box 123)
     167                ((@ my-box (x (set! set-x))) (set-x 2)))))
    161168
    162169(test-group "tails"
Note: See TracChangeset for help on using the changeset viewer.