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
0c2d7402
Commit
0c2d7402
authored
Jun 03, 2012
by
Daniel Bovensiepen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add more superclass tests
parent
c78dc293
Changes
15
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
62 additions
and
0 deletions
+62
-0
test/t/array.rb
test/t/array.rb
+4
-0
test/t/false.rb
test/t/false.rb
+4
-0
test/t/float.rb
test/t/float.rb
+4
-0
test/t/hash.rb
test/t/hash.rb
+4
-0
test/t/integer.rb
test/t/integer.rb
+4
-0
test/t/module.rb
test/t/module.rb
+4
-0
test/t/numeric.rb
test/t/numeric.rb
+4
-0
test/t/object.rb
test/t/object.rb
+5
-0
test/t/proc.rb
test/t/proc.rb
+4
-0
test/t/range.rb
test/t/range.rb
+4
-0
test/t/string.rb
test/t/string.rb
+4
-0
test/t/struct.rb
test/t/struct.rb
+5
-0
test/t/symbol.rb
test/t/symbol.rb
+4
-0
test/t/time.rb
test/t/time.rb
+4
-0
test/t/true.rb
test/t/true.rb
+4
-0
No files found.
test/t/array.rb
View file @
0c2d7402
...
...
@@ -5,6 +5,10 @@ assert('Array', '15.2.12') do
Array
.
class
==
Class
end
assert
(
'Array superclass'
,
'15.2.12.2'
)
do
Array
.
superclass
==
Object
end
assert
(
'Array.[]'
,
'15.2.12.4.1'
)
do
Array
.
[
](
1
,
2
,
3
)
==
[
1
,
2
,
3
]
end
...
...
test/t/false.rb
View file @
0c2d7402
...
...
@@ -5,6 +5,10 @@ assert('FalseClass', '15.2.6') do
FalseClass
.
class
==
Class
end
assert
(
'FalseClass superclass'
,
'15.2.6.2'
)
do
FalseClass
.
superclass
==
Object
end
assert
(
'FalseClass false'
,
'15.2.6.1'
)
do
not
false
end
...
...
test/t/float.rb
View file @
0c2d7402
...
...
@@ -5,6 +5,10 @@ assert('Float', '15.2.9') do
Float
.
class
==
Class
end
assert
(
'Float superclass'
,
'15.2.9.2'
)
do
Float
.
superclass
==
Numeric
end
assert
(
'Float#+'
,
'15.2.9.3.1'
)
do
a
=
3.123456788
+
0.000000001
b
=
3.123456789
+
1
...
...
test/t/hash.rb
View file @
0c2d7402
...
...
@@ -5,6 +5,10 @@ assert('Hash', '15.2.13') do
Hash
.
class
==
Class
end
assert
(
'Hash superclass'
,
'15.2.13.2'
)
do
Hash
.
superclass
==
Object
end
assert
(
'Hash#=='
,
'15.2.13.4.1'
)
do
({
'abc'
=>
'abc'
}
==
{
'abc'
=>
'abc'
})
and
not
({
'abc'
=>
'abc'
}
==
{
'cba'
=>
'cba'
})
...
...
test/t/integer.rb
View file @
0c2d7402
...
...
@@ -5,6 +5,10 @@ assert('Integer', '15.2.8') do
Integer
.
class
==
Class
end
assert
(
'Integer superclass'
,
'15.2.8.2'
)
do
Integer
.
superclass
==
Numeric
end
assert
(
'Integer#+'
,
'15.2.8.3.1'
)
do
a
=
1
+
1
b
=
1
+
1.0
...
...
test/t/module.rb
View file @
0c2d7402
...
...
@@ -5,6 +5,10 @@ assert('Module', '15.2.2') do
Module
.
class
==
Class
end
assert
(
'Module superclass'
,
'15.2.2.2'
)
do
Module
.
superclass
==
Object
end
assert
(
'Module#const_defined?'
,
'15.2.2.4.20'
)
do
module
Test4ConstDefined
Const4Test4ConstDefined
=
true
...
...
test/t/numeric.rb
View file @
0c2d7402
...
...
@@ -5,6 +5,10 @@ assert('Numeric', '15.2.7') do
Numeric
.
class
==
Class
end
assert
(
'Numeric superclass'
,
'15.2.7.2'
)
do
Numeric
.
superclass
==
Object
end
assert
(
'Numeric#+@'
,
'15.2.7.4.1'
)
do
+
1
==
+
1
end
...
...
test/t/object.rb
View file @
0c2d7402
...
...
@@ -4,3 +4,8 @@
assert
(
'Object'
,
'15.2.1'
)
do
Object
.
class
==
Class
end
assert
(
'Object superclass'
,
'15.2.1.2'
)
do
Object
.
superclass
==
BasicObject
end
test/t/proc.rb
View file @
0c2d7402
...
...
@@ -5,6 +5,10 @@ assert('Proc', '15.2.17') do
Proc
.
class
==
Class
end
assert
(
'Proc superclass'
,
'15.2.17.2'
)
do
Proc
.
superclass
==
Object
end
assert
(
'Proc.new'
,
'15.2.17.3.1'
)
do
a
=
nil
...
...
test/t/range.rb
View file @
0c2d7402
...
...
@@ -5,6 +5,10 @@ assert('Range', '15.2.14') do
Range
.
class
==
Class
end
assert
(
'Range superclass'
,
'15.2.14.2'
)
do
Range
.
superclass
==
Object
end
assert
(
'Range#=='
,
'15.2.14.4.1'
)
do
(
1
..
10
)
==
(
1
..
10
)
and
not
(
1
..
10
)
==
(
1
..
100
)
end
...
...
test/t/string.rb
View file @
0c2d7402
...
...
@@ -5,6 +5,10 @@ assert('String', '15.2.10') do
String
.
class
==
Class
end
assert
(
'String superclass'
,
'15.2.10.2'
)
do
String
.
superclass
==
Object
end
assert
(
'String#*'
,
'15.2.10.5.1'
)
do
'a'
*
5
==
'aaaaa'
end
...
...
test/t/struct.rb
View file @
0c2d7402
...
...
@@ -4,3 +4,8 @@
assert
(
'Struct'
,
'15.2.18'
)
do
Struct
.
class
==
Class
end
assert
(
'Struct superclass'
,
'15.2.18.2'
)
do
Struct
.
superclass
==
Object
end
test/t/symbol.rb
View file @
0c2d7402
...
...
@@ -5,6 +5,10 @@ assert('Symbol', '15.2.11') do
Symbol
.
class
==
Class
end
assert
(
'Symbol superclass'
,
'15.2.11.2'
)
do
Symbol
.
superclass
==
Object
end
assert
(
'Symbol#==='
,
'15.2.11.3.1'
)
do
:abc
===
:abc
and
not
:abc
===
:cba
end
...
...
test/t/time.rb
View file @
0c2d7402
...
...
@@ -5,6 +5,10 @@ assert('Time', '15.2.19') do
Time
.
class
==
Class
end
assert
(
'Time superclass'
,
'15.2.19.2'
)
do
Time
.
superclass
==
Object
end
assert
(
'Time.at'
,
'15.2.19.6.1'
)
do
Time
.
at
(
1300000000.0
)
end
...
...
test/t/true.rb
View file @
0c2d7402
...
...
@@ -5,6 +5,10 @@ assert('TrueClass', '15.2.5') do
TrueClass
.
class
==
Class
end
assert
(
'TrueClass superclass'
,
'15.2.5.2'
)
do
TrueClass
.
superclass
==
Object
end
assert
(
'TrueClass true'
,
'15.2.5.1'
)
do
true
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