diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2025-09-21 23:23:59 -0400 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2025-09-21 23:23:59 -0400 |
| commit | 5824a2ef19879c59866667aced6b3f90e5925648 (patch) | |
| tree | a18ddeadb0c164c7a544b571c3968f86afb759ba /api/booleans.md | |
| parent | bf067544e98f4085c26161953e301aaa00a904df (diff) | |
Update docs with proper assertions
Diffstat (limited to 'api/booleans.md')
| -rw-r--r-- | api/booleans.md | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/api/booleans.md b/api/booleans.md index ab08909d..5a7432fd 100644 --- a/api/booleans.md +++ b/api/booleans.md @@ -21,19 +21,13 @@ remainder | `&Text?` | If non-none, this argument will be set to the remainder o **Example:** ```tomo ->> Bool.parse("yes") -= yes : Bool? ->> Bool.parse("no") -= no : Bool? ->> Bool.parse("???") -= none : Bool? - ->> Bool.parse("yesJUNK") -= none : Bool? +assert Bool.parse("yes") == yes +assert Bool.parse("no") == no +assert Bool.parse("???") == none + +assert Bool.parse("yesJUNK") == none remainder : Text ->> Bool.parse("yesJUNK", &remainder) -= yes : Bool? ->> remainder -= "JUNK" +assert Bool.parse("yesJUNK", &remainder) == yes +assert remainder == "JUNK" ``` |
