summaryrefslogtreecommitdiffhomepage
path: root/test/t/class.rb
diff options
context:
space:
mode:
authorDaniel Bovensiepen <[email protected]>2013-06-09 03:51:44 +0800
committerDaniel Bovensiepen <[email protected]>2013-06-09 03:51:44 +0800
commit83d04a539e3e765b2e82d02cfbcde4a77808eb29 (patch)
tree603549c7cd47ac095587838ad19cff23dfd0412c /test/t/class.rb
parent16424a14dc3b1a70ef8ebe3923c3dbd482e77c93 (diff)
downloadmruby-83d04a539e3e765b2e82d02cfbcde4a77808eb29.tar.gz
mruby-83d04a539e3e765b2e82d02cfbcde4a77808eb29.zip
Improve undef tests
Diffstat (limited to 'test/t/class.rb')
-rw-r--r--test/t/class.rb59
1 files changed, 0 insertions, 59 deletions
diff --git a/test/t/class.rb b/test/t/class.rb
index 13845a49f..e6d7128fa 100644
--- a/test/t/class.rb
+++ b/test/t/class.rb
@@ -252,62 +252,3 @@ assert('Class Alias 2') do
A.new.test == 2 and A.new.test2 == 1
end
-
-assert('Class Undef 1') do
- class A
- def test1; 1; end
- def test2; 2; end
-
- undef test1
- undef :test2
- end
-
- result1 = false
- begin
- A.new.test1
- rescue NoMethodError
- result1 = true
- end
-
- result2 = false
- begin
- A.new.test2
- rescue NoMethodError
- result2 = true
- end
-
- result1 == true and result2 == true
-end
-
-assert('Class Undef 2') do
- class A
- def test1; 1; end
- def test2; 2; end
-
- undef test1, test2
- end
-
- result1 = false
- begin
- A.new.test1
- rescue NoMethodError
- result1 = true
- end
-
- result2 = false
- begin
- A.new.test2
- rescue NoMethodError
- result2 = true
- end
-
- result1 == true and result2 == true
-end
-
-assert('Var undef') do
- assert_raise(NameError) do
- a=1
- undef a
- end
-end
-