File: boxes.sps

package info (click to toggle)
chez-srfi 0.0%2Bgit20241031.b424440%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 3,608 kB
  • sloc: lisp: 25,299; sh: 326; makefile: 11
file content (18 lines) | stat: -rw-r--r-- 364 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
;; Copyright © 2020 Amirouche Boubekki
;; SPDX-License-Identifier: MIT
#!r6rs

;; Tests for SRFI 111

(import
  (rnrs)
  (srfi :111 boxes)
  (srfi :64 testing))

(test-begin "boxes")
(test-equal #t (box? (box 42)))
(test-equal 42 (unbox (box 42)))
(test-equal 42 (let ((b (box 0)))
                 (set-box! b 42)
                 (unbox b)))
(test-end "boxes")