-
-
Notifications
You must be signed in to change notification settings - Fork 39
Conversation
Can you add a test that catches this case? |
I'm not actually sure what the expected behaviour is here. With |
i.e. will |
I think the goal of this package is to mimic the base parsing as closely as possible, so I think your suggested test will do just fine. @KristofferC, do you have any recommendations regarding how this should be tested? |
@@ -1022,3 +1022,6 @@ facts("misc syntax changes") do | |||
@fact (Parser.parse(ex) |> norm_ast) --> (Base.parse(ex) |> norm_ast) | |||
end | |||
end | |||
|
|||
# issue #72 : failure to parse and incorrectly specified vector | |||
Base.@test Parser.parse("[1,2;3]") == :([$(Expr(:parameters, 3));1;2]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, looking a few lines above this, I think we can follow suit with existing tests and simplify this to
Base.@test Parser.parse("[1,2;3]") == Base.parse("[1,2;3]")
Though since the rest of the tests are using FactCheck, this should probably use the @fact a --> b
syntax rather than Base.@test
.
|
||
#issue 72 | ||
facts("parse an incorrectly specified vector") do | ||
@fact Parser.parse("[1,2;3]") --> :([$(Expr(:parameters, 3));1;2]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should use Base.parse("[1,2,;3]")
on the RHS
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah yes!
No description provided.