Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mruby
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
mruby
Commits
ec5b0556
Commit
ec5b0556
authored
Jun 15, 2014
by
take_cheeze
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move direct superclass checking to `test/t/superclass.rb`.
parent
0042e586
Changes
23
Hide whitespace changes
Inline
Side-by-side
Showing
23 changed files
with
30 additions
and
90 deletions
+30
-90
test/t/argumenterror.rb
test/t/argumenterror.rb
+0
-5
test/t/array.rb
test/t/array.rb
+0
-4
test/t/class.rb
test/t/class.rb
+0
-4
test/t/exception.rb
test/t/exception.rb
+0
-4
test/t/false.rb
test/t/false.rb
+0
-4
test/t/float.rb
test/t/float.rb
+0
-4
test/t/hash.rb
test/t/hash.rb
+0
-4
test/t/indexerror.rb
test/t/indexerror.rb
+0
-4
test/t/integer.rb
test/t/integer.rb
+0
-4
test/t/module.rb
test/t/module.rb
+0
-4
test/t/nameerror.rb
test/t/nameerror.rb
+0
-4
test/t/nil.rb
test/t/nil.rb
+0
-4
test/t/nomethoderror.rb
test/t/nomethoderror.rb
+0
-4
test/t/numeric.rb
test/t/numeric.rb
+0
-4
test/t/proc.rb
test/t/proc.rb
+0
-4
test/t/range.rb
test/t/range.rb
+0
-4
test/t/rangeerror.rb
test/t/rangeerror.rb
+0
-4
test/t/standarderror.rb
test/t/standarderror.rb
+0
-4
test/t/string.rb
test/t/string.rb
+0
-4
test/t/superclass.rb
test/t/superclass.rb
+30
-0
test/t/symbol.rb
test/t/symbol.rb
+0
-4
test/t/true.rb
test/t/true.rb
+0
-4
test/t/typeerror.rb
test/t/typeerror.rb
+0
-5
No files found.
test/t/argumenterror.rb
View file @
ec5b0556
...
...
@@ -14,8 +14,3 @@ assert('ArgumentError', '15.2.24') do
assert_equal
(
Class
,
ArgumentError
.
class
)
assert_equal
(
ArgumentError
,
e2
.
class
)
end
assert
(
'ArgumentError superclass'
,
'15.2.24.2'
)
do
assert_equal
(
StandardError
,
ArgumentError
.
superclass
)
end
test/t/array.rb
View file @
ec5b0556
...
...
@@ -5,10 +5,6 @@ assert('Array', '15.2.12') do
assert_equal
(
Class
,
Array
.
class
)
end
assert
(
'Array superclass'
,
'15.2.12.2'
)
do
assert_equal
(
Object
,
Array
.
superclass
)
end
assert
(
'Array inclueded modules'
,
'15.2.12.3'
)
do
assert_true
(
Array
.
include?
(
Enumerable
))
end
...
...
test/t/class.rb
View file @
ec5b0556
...
...
@@ -5,10 +5,6 @@ assert('Class', '15.2.3') do
assert_equal
(
Class
,
Class
.
class
)
end
assert
(
'Class superclass'
,
'15.2.3.2'
)
do
assert_equal
(
Module
,
Class
.
superclass
)
end
assert
(
'Class#initialize'
,
'15.2.3.3.1'
)
do
c
=
Class
.
new
do
def
test
...
...
test/t/exception.rb
View file @
ec5b0556
...
...
@@ -5,10 +5,6 @@ assert('Exception', '15.2.22') do
assert_equal
Class
,
Exception
.
class
end
assert
(
'Exception superclass'
,
'15.2.22.2'
)
do
assert_equal
Object
,
Exception
.
superclass
end
assert
(
'Exception.exception'
,
'15.2.22.4.1'
)
do
e
=
Exception
.
exception
(
'a'
)
...
...
test/t/false.rb
View file @
ec5b0556
...
...
@@ -11,10 +11,6 @@ assert('FalseClass false', '15.2.6.1') do
assert_false
FalseClass
.
method_defined?
:new
end
assert
(
'FalseClass superclass'
,
'15.2.6.2'
)
do
assert_equal
Object
,
FalseClass
.
superclass
end
assert
(
'FalseClass#&'
,
'15.2.6.3.1'
)
do
assert_false
false
.
&
(
true
)
assert_false
false
.
&
(
false
)
...
...
test/t/float.rb
View file @
ec5b0556
...
...
@@ -5,10 +5,6 @@ assert('Float', '15.2.9') do
assert_equal
Class
,
Float
.
class
end
assert
(
'Float superclass'
,
'15.2.9.2'
)
do
assert_equal
Numeric
,
Float
.
superclass
end
assert
(
'Float#+'
,
'15.2.9.3.1'
)
do
a
=
3.123456788
+
0.000000001
b
=
3.123456789
+
1
...
...
test/t/hash.rb
View file @
ec5b0556
...
...
@@ -5,10 +5,6 @@ assert('Hash', '15.2.13') do
assert_equal
Class
,
Hash
.
class
end
assert
(
'Hash superclass'
,
'15.2.13.2'
)
do
assert_equal
Object
,
Hash
.
superclass
end
assert
(
'Hash#=='
,
'15.2.13.4.1'
)
do
assert_true
({
'abc'
=>
'abc'
}
==
{
'abc'
=>
'abc'
})
assert_false
({
'abc'
=>
'abc'
}
==
{
'cba'
=>
'cba'
})
...
...
test/t/indexerror.rb
View file @
ec5b0556
...
...
@@ -4,7 +4,3 @@
assert
(
'IndexError'
,
'15.2.33'
)
do
assert_equal
Class
,
IndexError
.
class
end
assert
(
'IndexError superclass'
,
'15.2.33.2'
)
do
assert_equal
StandardError
,
IndexError
.
superclass
end
test/t/integer.rb
View file @
ec5b0556
...
...
@@ -5,10 +5,6 @@ assert('Integer', '15.2.8') do
assert_equal
Class
,
Integer
.
class
end
assert
(
'Integer superclass'
,
'15.2.8.2'
)
do
assert_equal
Numeric
,
Integer
.
superclass
end
assert
(
'Integer#+'
,
'15.2.8.3.1'
)
do
a
=
1
+
1
b
=
1
+
1.0
...
...
test/t/module.rb
View file @
ec5b0556
...
...
@@ -5,10 +5,6 @@ assert('Module', '15.2.2') do
assert_equal
Class
,
Module
.
class
end
assert
(
'Module superclass'
,
'15.2.2.2'
)
do
assert_equal
Object
,
Module
.
superclass
end
# TODO not implemented ATM assert('Module.constants', '15.2.2.3.1') do
# TODO not implemented ATM assert('Module.nesting', '15.2.2.3.2') do
...
...
test/t/nameerror.rb
View file @
ec5b0556
...
...
@@ -5,10 +5,6 @@ assert('NameError', '15.2.31') do
assert_equal
Class
,
NameError
.
class
end
assert
(
'NameError superclass'
,
'15.2.31.2'
)
do
assert_equal
StandardError
,
NameError
.
superclass
end
assert
(
'NameError#name'
,
'15.2.31.2.1'
)
do
# This check is not duplicate with 15.2.31.2.2 check.
...
...
test/t/nil.rb
View file @
ec5b0556
...
...
@@ -10,10 +10,6 @@ assert('NilClass', '15.2.4.1') do
assert_false
NilClass
.
method_defined?
:new
end
assert
(
'NilClass superclass'
,
'15.2.4.2'
)
do
assert_equal
Object
,
NilClass
.
superclass
end
assert
(
'NilClass#&'
,
'15.2.4.3.1'
)
do
assert_false
nil
.
&
(
true
)
assert_false
nil
.
&
(
nil
)
...
...
test/t/nomethoderror.rb
View file @
ec5b0556
...
...
@@ -8,10 +8,6 @@ assert('NoMethodError', '15.2.32') do
end
end
assert
(
'NoMethodError superclass'
,
'15.2.32.2'
)
do
assert_equal
NameError
,
NoMethodError
.
superclass
end
assert
(
'NoMethodError#args'
,
'15.2.32.2.1'
)
do
a
=
NoMethodError
.
new
'test'
,
:test
,
[
1
,
2
]
assert_equal
[
1
,
2
],
a
.
args
...
...
test/t/numeric.rb
View file @
ec5b0556
...
...
@@ -5,10 +5,6 @@ assert('Numeric', '15.2.7') do
assert_equal
Class
,
Numeric
.
class
end
assert
(
'Numeric superclass'
,
'15.2.7.2'
)
do
assert_equal
Object
,
Numeric
.
superclass
end
assert
(
'Numeric#+@'
,
'15.2.7.4.1'
)
do
assert_equal
(
+
1
,
+
1
)
end
...
...
test/t/proc.rb
View file @
ec5b0556
...
...
@@ -5,10 +5,6 @@ assert('Proc', '15.2.17') do
assert_equal
Class
,
Proc
.
class
end
assert
(
'Proc superclass'
,
'15.2.17.2'
)
do
assert_equal
Object
,
Proc
.
superclass
end
assert
(
'Proc.new'
,
'15.2.17.3.1'
)
do
assert_raise
ArgumentError
do
Proc
.
new
...
...
test/t/range.rb
View file @
ec5b0556
...
...
@@ -5,10 +5,6 @@ assert('Range', '15.2.14') do
assert_equal
Class
,
Range
.
class
end
assert
(
'Range superclass'
,
'15.2.14.2'
)
do
assert_equal
Object
,
Range
.
superclass
end
assert
(
'Range#=='
,
'15.2.14.4.1'
)
do
assert_true
(
1
..
10
)
==
(
1
..
10
)
assert_false
(
1
..
10
)
==
(
1
..
100
)
...
...
test/t/rangeerror.rb
View file @
ec5b0556
...
...
@@ -4,7 +4,3 @@
assert
(
'RangeError'
,
'15.2.26'
)
do
assert_equal
Class
,
RangeError
.
class
end
assert
(
'RangeError superclass'
,
'15.2.26.2'
)
do
assert_equal
StandardError
,
RangeError
.
superclass
end
test/t/standarderror.rb
View file @
ec5b0556
...
...
@@ -4,7 +4,3 @@
assert
(
'StandardError'
,
'15.2.23'
)
do
assert_equal
Class
,
StandardError
.
class
end
assert
(
'StandardError superclass'
,
'15.2.23.2'
)
do
assert_equal
Exception
,
StandardError
.
superclass
end
test/t/string.rb
View file @
ec5b0556
...
...
@@ -5,10 +5,6 @@ assert('String', '15.2.10') do
assert_equal
Class
,
String
.
class
end
assert
(
'String superclass'
,
'15.2.10.2'
)
do
assert_equal
Object
,
String
.
superclass
end
assert
(
'String#<=>'
,
'15.2.10.5.1'
)
do
a
=
''
<=>
''
b
=
''
<=>
'not empty'
...
...
test/t/superclass.rb
0 → 100644
View file @
ec5b0556
[
[
:Module
,
:Object
,
'15.2.2.2'
],
[
:Class
,
:Module
,
'15.2.3.2'
],
[
:NilClass
,
:Object
,
'15.2.4.2'
],
[
:TrueClass
,
:Object
,
'15.2.5.2'
],
[
:FalseClass
,
:Object
,
'15.2.6.2'
],
[
:Numeric
,
:Object
,
'15.2.7.2'
],
[
:Integer
,
:Numeric
,
'15.2.8.2'
],
[
:Float
,
:Numeric
,
'15.2.9.2'
],
[
:String
,
:Object
,
'15.2.10.2'
],
[
:Symbol
,
:Object
,
'15.2.11.2'
],
[
:Array
,
:Object
,
'15.2.12.2'
],
[
:Hash
,
:Object
,
'15.2.13.2'
],
[
:Range
,
:Object
,
'15.2.14.2'
],
[
:Proc
,
:Object
,
'15.2.17.2'
],
[
:Exception
,
:Object
,
'15.2.22.2'
],
[
:StandardError
,
:Exception
,
'15.2.23.2'
],
[
:ArgumentError
,
:StandardError
,
'15.2.24.2'
],
[
:RangeError
,
:StandardError
,
'12.2.26.2'
],
[
:TypeError
,
:StandardError
,
'12.2.29.2'
],
[
:NameError
,
:StandardError
,
'15.2.31.2'
],
[
:NoMethodError
,
:NameError
,
'15.2.32.2'
],
[
:IndexError
,
:StandardError
,
'15.2.33.2'
],
].
each
do
|
cls
,
super_cls
,
iso
|
assert
"Direct superclass of
#{
cls
}
"
,
iso
do
assert_true
Object
.
const_defined?
cls
assert_true
Object
.
const_defined?
super_cls
assert_equal
Object
.
const_get
(
super_cls
),
Object
.
const_get
(
cls
).
superclass
end
end
test/t/symbol.rb
View file @
ec5b0556
...
...
@@ -5,10 +5,6 @@ assert('Symbol', '15.2.11') do
assert_equal
Class
,
Symbol
.
class
end
assert
(
'Symbol superclass'
,
'15.2.11.2'
)
do
assert_equal
Object
,
Symbol
.
superclass
end
assert
(
'Symbol#==='
,
'15.2.11.3.1'
)
do
assert_true
:abc
==
:abc
assert_false
:abc
==
:cba
...
...
test/t/true.rb
View file @
ec5b0556
...
...
@@ -11,10 +11,6 @@ assert('TrueClass true', '15.2.5.1') do
assert_false
TrueClass
.
method_defined?
:new
end
assert
(
'TrueClass superclass'
,
'15.2.5.2'
)
do
assert_equal
Object
,
TrueClass
.
superclass
end
assert
(
'TrueClass#&'
,
'15.2.5.3.1'
)
do
assert_true
true
.
&
(
true
)
assert_false
true
.
&
(
false
)
...
...
test/t/typeerror.rb
View file @
ec5b0556
...
...
@@ -4,8 +4,3 @@
assert
(
'TypeError'
,
'15.2.29'
)
do
assert_equal
Class
,
TypeError
.
class
end
assert
(
'TypeError superclass'
,
'15.2.29.2'
)
do
assert_equal
StandardError
,
TypeError
.
superclass
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment