Skip to content

Commit 201aa09

Browse files
author
Amirouche
committed
srfi 111 boxes
1 parent 8ece901 commit 201aa09

File tree

4 files changed

+23
-0
lines changed

4 files changed

+23
-0
lines changed

%3a111.sls

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
(library (srfi :111) (export box box? unbox set-box!) (import (srfi :111 boxes)))

%3a111/boxes.sls

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
(library (srfi :111 boxes)
2+
(export box box? unbox set-box!)
3+
(import (only (chezscheme) box box? unbox set-box!)))

tests/boxes.sps

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
;; Copyright © 2020 Amirouche Boubekki
2+
;; SPDX-License-Identifier: MIT
3+
#!r6rs
4+
5+
;; Tests for SRFI 111
6+
7+
(import
8+
(rnrs)
9+
(srfi :111 boxes)
10+
(srfi :64 testing))
11+
12+
(test-begin "boxes")
13+
(test-equal #t (box? (box 42)))
14+
(test-equal 42 (unbox (box 42)))
15+
(test-equal 42 (let ((b (box 0)))
16+
(set-box! b 42)
17+
(unbox b)))
18+
(test-end "boxes")

tests/test_all.sh

+1
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ records.sps
4343
regexp.sps
4444
tables-test.sps
4545
vectors.sps
46+
boxes.sps
4647
'
4748

4849
fails='

0 commit comments

Comments
 (0)