Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

moar 1.9 tests pls (pushing up from RP)

[git-p4: depot-paths = "//src/sexp_processor/dev/": change = 7621]
  • Loading branch information...
commit 5aacc3a16649facfba579c1f6339154196f4e7c3 1 parent 0e2f2a4
Ryan Davis zenspider authored
Showing with 32 additions and 5 deletions.
  1. +32 −5 lib/pt_testcase.rb
37 lib/pt_testcase.rb
View
@@ -420,6 +420,32 @@ def self.unsupported_tests *tests
:a,
s(:lit, 1), s(:lit, 2), s(:lit, 3)))
+ add_19tests("call_bang",
+ "Ruby" => "!a",
+ "ParseTree" => s(:call,
+ s(:call, nil, :a),
+ :"!"))
+
+ add_19tests("call_bang_empty",
+ "Ruby" => "! ()",
+ "ParseTree" => s(:call, s(:nil), :"!"))
+
+ add_19tests("call_fonz",
+ "Ruby" => "a.()",
+ "ParseTree" => s(:call, s(:call, nil, :a), :call))
+
+ add_19tests("call_fonz_cm",
+ "Ruby" => "a::()",
+ "ParseTree" => s(:call, s(:call, nil, :a), :call))
+
+ add_19tests("call_not",
+ "Ruby" => "not (42)",
+ "ParseTree" => s(:call, s(:lit, 42), :"!"))
+
+ # add_19tests("call_not_empty",
+ # "Ruby" => "not ()",
+ # "ParseTree" => s(:call, s(:lit, 42), :"!"))
+
add_19tests("call_not_equal",
"Ruby" => "a != b",
"ParseTree" => s(:call,
@@ -427,11 +453,12 @@ def self.unsupported_tests *tests
:"!=",
s(:call, nil, :b)))
- add_19tests("call_unary_not",
- "Ruby" => "!a",
- "ParseTree" => s(:call,
- s(:call, nil, :a),
- :"!"))
+ add_19tests("call_splat_mid",
+ "Ruby" => "def f(a = nil, *b, c) end",
+ "ParseTree" => s(:defn, :f,
+ s(:args, :a, :"*b", :c,
+ s(:block, s(:lasgn, :a, s(:nil)))),
+ s(:nil)))
add_19tests("defn_args_mand_opt_mand",
"Ruby" => "def f(mand1, opt = 42, mand2)\n # do nothing\nend",
Please sign in to comment.
Something went wrong with that request. Please try again.