diff options
author | Eduardo Julian | 2018-08-23 17:18:30 -0400 |
---|---|---|
committer | Eduardo Julian | 2018-08-23 17:18:30 -0400 |
commit | d9965e587905cd715ecd4c7150236d660321a02c (patch) | |
tree | fb67b317abaf15a7cf7624f7542d15b6e8ecc055 /stdlib/test | |
parent | 27eed2a94ff9446014564958439fc5381584568b (diff) |
Optimized text clipping.
Diffstat (limited to 'stdlib/test')
-rw-r--r-- | stdlib/test/test/lux/compiler/default/phase/analysis/procedure/common.lux | 2 | ||||
-rw-r--r-- | stdlib/test/test/lux/compiler/default/syntax.lux | 20 |
2 files changed, 11 insertions, 11 deletions
diff --git a/stdlib/test/test/lux/compiler/default/phase/analysis/procedure/common.lux b/stdlib/test/test/lux/compiler/default/phase/analysis/procedure/common.lux index fc082155a..cfc164df9 100644 --- a/stdlib/test/test/lux/compiler/default/phase/analysis/procedure/common.lux +++ b/stdlib/test/test/lux/compiler/default/phase/analysis/procedure/common.lux @@ -167,7 +167,7 @@ (test "Can obtain the character code of a text at a given index." (check-success+ "lux text char" (list subjectC fromC) (type (Maybe Nat)))) (test "Can clip a piece of text between 2 indices." - (check-success+ "lux text clip" (list subjectC fromC toC) (type (Maybe Text)))) + (check-success+ "lux text clip" (list subjectC fromC toC) Text)) )))) (context: "IO procedures" diff --git a/stdlib/test/test/lux/compiler/default/syntax.lux b/stdlib/test/test/lux/compiler/default/syntax.lux index 829199aa8..887765cbd 100644 --- a/stdlib/test/test/lux/compiler/default/syntax.lux +++ b/stdlib/test/test/lux/compiler/default/syntax.lux @@ -87,23 +87,23 @@ other code^] ($_ seq (test "Can parse Lux code." - (case (&.read "" (dict.new text.Hash<Text>) - [default-cursor 0 (code.to-text sample)]) + (case (&.parse "" (dict.new text.Hash<Text>) + [default-cursor 0 (code.to-text sample)]) (#e.Error error) #0 (#e.Success [_ parsed]) (:: code.Equivalence<Code> = parsed sample))) (test "Can parse Lux multiple code nodes." - (case (&.read "" (dict.new text.Hash<Text>) - [default-cursor 0 (format (code.to-text sample) " " - (code.to-text other))]) + (case (&.parse "" (dict.new text.Hash<Text>) + [default-cursor 0 (format (code.to-text sample) " " + (code.to-text other))]) (#e.Error error) #0 (#e.Success [remaining =sample]) - (case (&.read "" (dict.new text.Hash<Text>) - remaining) + (case (&.parse "" (dict.new text.Hash<Text>) + remaining) (#e.Error error) #0 @@ -133,9 +133,9 @@ comment comment^] ($_ seq (test "Can handle comments." - (case (&.read "" (dict.new text.Hash<Text>) - [default-cursor 0 - (format comment (code.to-text sample))]) + (case (&.parse "" (dict.new text.Hash<Text>) + [default-cursor 0 + (format comment (code.to-text sample))]) (#e.Error error) #0 |