forked from rebolsource/r3
-
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
It was already accepting bitsets, so why not to support typesets too. Added a few `typeset!` unit tests (not complete)
- Loading branch information
Showing
5 changed files
with
49 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
Rebol [ | ||
Title: "Rebol3 typeset! test script" | ||
Author: "Oldes, Peter W A Wood" | ||
File: %typeset-test.r3 | ||
Tabs: 4 | ||
Needs: [%../quick-test-module.r3] | ||
] | ||
|
||
~~~start-file~~~ "typeset" | ||
|
||
===start-group=== "typeset!" | ||
--test-- "make typeset!" | ||
--assert typeset? types: make typeset! [block! map! object!] | ||
--test-- "find in typeset" | ||
--assert find types block! | ||
--assert find types map! | ||
--assert find types object! | ||
--assert not find types string! | ||
|
||
--test-- "union of typesets" | ||
types2: union types make typeset! [string!] | ||
--assert typeset? types2 | ||
--assert find types2 string! | ||
|
||
--test-- "complement of typesets" | ||
not-types: complement types | ||
--assert typeset? not-types | ||
--assert find not-types integer! | ||
|
||
--test-- "difference of typesets" | ||
types3: difference types make typeset! [object!] | ||
--assert typeset? types3 | ||
--assert not find types3 object! | ||
|
||
--test-- "empty typeset test" | ||
;@@ requested: https://github.com/red/REP/issues/55 | ||
--assert empty? make typeset! [] | ||
--assert not empty? types | ||
|
||
===end-group=== | ||
|
||
~~~end-file~~~ |