mirror of
https://github.com/zhigang1992/RubyMotion.git
synced 2026-05-19 12:22:27 +08:00
[test] add spec for RM-276
This commit is contained in:
@@ -10,6 +10,10 @@ class Base
|
||||
def func(x, a:y, b:z)
|
||||
12345
|
||||
end
|
||||
|
||||
def func2(x, y)
|
||||
98765
|
||||
end
|
||||
end
|
||||
|
||||
class Foo < Base
|
||||
@@ -21,6 +25,10 @@ class Foo < Base
|
||||
def func(x, a:y, b:z)
|
||||
super(x, a:y, b:z)
|
||||
end
|
||||
|
||||
def func2(x, y)
|
||||
super(x, {:a => 12, :b => 34, :c => 56})
|
||||
end
|
||||
end
|
||||
|
||||
class B < (defined?(UIView) ? UIView : NSView)
|
||||
@@ -57,5 +65,6 @@ describe "'super'" do
|
||||
# RM-276
|
||||
obj = Foo.new
|
||||
obj.func(1, a:2, b:3).should == 12345
|
||||
obj.func2(1, 2).should == 98765
|
||||
end
|
||||
end
|
||||
|
||||
2
vm
2
vm
Submodule vm updated: dbd1ed3ea5...97670678bb
Reference in New Issue
Block a user