diff options
author | Eduardo Julian | 2018-08-29 19:20:48 -0400 |
---|---|---|
committer | Eduardo Julian | 2018-08-29 19:20:48 -0400 |
commit | 7e1738a58acbada98a56bf5ce5853121e1aa60fe (patch) | |
tree | 75d499b9962bfff4c77f25f32fcd6eb5c6b62ceb /stdlib/test | |
parent | 907eb3199f929a8644c77ad53a2e5c12c8caa624 (diff) |
Method imports are now done as macros instead of functions.
Diffstat (limited to '')
-rw-r--r-- | stdlib/test/test/lux/compiler/default/syntax.lux | 37 | ||||
-rw-r--r-- | stdlib/test/test/lux/host.jvm.lux | 2 |
2 files changed, 21 insertions, 18 deletions
diff --git a/stdlib/test/test/lux/compiler/default/syntax.lux b/stdlib/test/test/lux/compiler/default/syntax.lux index 887765cbd..165a224e5 100644 --- a/stdlib/test/test/lux/compiler/default/syntax.lux +++ b/stdlib/test/test/lux/compiler/default/syntax.lux @@ -87,29 +87,31 @@ other code^] ($_ seq (test "Can parse Lux code." - (case (&.parse "" (dict.new text.Hash<Text>) - [default-cursor 0 (code.to-text sample)]) + (case (let [source-code (%code sample)] + (&.parse "" (dict.new text.Hash<Text>) (text.size source-code) + [default-cursor 0 source-code])) (#e.Error error) #0 (#e.Success [_ parsed]) (:: code.Equivalence<Code> = parsed sample))) (test "Can parse Lux multiple code nodes." - (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 (&.parse "" (dict.new text.Hash<Text>) - remaining) + (let [source-code (format (%code sample) " " (%code other)) + source-code//size (text.size source-code)] + (case (&.parse "" (dict.new text.Hash<Text>) source-code//size + [default-cursor 0 source-code]) (#e.Error error) #0 - (#e.Success [_ =other]) - (and (:: code.Equivalence<Code> = sample =sample) - (:: code.Equivalence<Code> = other =other))))) + (#e.Success [remaining =sample]) + (case (&.parse "" (dict.new text.Hash<Text>) source-code//size + remaining) + (#e.Error error) + #0 + + (#e.Success [_ =other]) + (and (:: code.Equivalence<Code> = sample =sample) + (:: code.Equivalence<Code> = other =other)))))) )))) (def: comment-text^ @@ -133,9 +135,10 @@ comment comment^] ($_ seq (test "Can handle comments." - (case (&.parse "" (dict.new text.Hash<Text>) - [default-cursor 0 - (format comment (code.to-text sample))]) + (case (let [source-code (format comment (%code sample)) + source-code//size (text.size source-code)] + (&.parse "" (dict.new text.Hash<Text>) source-code//size + [default-cursor 0 source-code])) (#e.Error error) #0 diff --git a/stdlib/test/test/lux/host.jvm.lux b/stdlib/test/test/lux/host.jvm.lux index 835bdd719..2444de871 100644 --- a/stdlib/test/test/lux/host.jvm.lux +++ b/stdlib/test/test/lux/host.jvm.lux @@ -92,7 +92,7 @@ (&.synchronized "" #1)) (test "Can access Class instances." - (text/= "java.lang.Class" (Class::getName [] (&.class-for java/lang/Class)))) + (text/= "java.lang.Class" (Class::getName (&.class-for java/lang/Class)))) (test "Can check if a value is null." (and (&.null? (&.null)) |