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
52b2d092
Commit
52b2d092
authored
May 23, 2012
by
Yukihiro Matsumoto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test t/*.rb spacing fix
parent
7ee8018d
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
20 additions
and
20 deletions
+20
-20
test/t/array.rb
test/t/array.rb
+4
-4
test/t/float.rb
test/t/float.rb
+7
-7
test/t/hash.rb
test/t/hash.rb
+4
-4
test/t/integer.rb
test/t/integer.rb
+1
-1
test/t/math.rb
test/t/math.rb
+2
-2
test/t/string.rb
test/t/string.rb
+2
-2
No files found.
test/t/array.rb
View file @
52b2d092
...
...
@@ -83,7 +83,7 @@ end
assert
(
'Array#index'
,
'15.2.12.5.14'
)
do
a
=
[
1
,
2
,
3
]
a
.
index
(
2
)
==
1
a
.
index
(
2
)
==
1
end
assert
(
'Array#initialize'
,
'15.2.12.5.15'
)
do
...
...
@@ -99,7 +99,7 @@ assert('Array#initialize_copy', '15.2.12.5.16') do
a
=
[
1
,
2
,
3
]
b
=
[].
initialize_copy
(
a
)
b
==
[
1
,
2
,
3
]
b
==
[
1
,
2
,
3
]
end
assert
(
'Array#join'
,
'15.2.12.5.17'
)
do
...
...
@@ -165,7 +165,7 @@ end
assert
(
'Array#rindex'
,
'15.2.12.5.26'
)
do
a
=
[
1
,
2
,
3
]
a
.
rindex
(
2
)
==
1
a
.
rindex
(
2
)
==
1
end
assert
(
'Array#shift'
,
'15.2.12.5.27'
)
do
...
...
@@ -178,7 +178,7 @@ end
assert
(
'Array#size'
,
'15.2.12.5.28'
)
do
a
=
[
1
,
2
,
3
]
a
.
size
==
3
a
.
size
==
3
end
assert
(
'Array#slice'
,
'15.2.12.5.29'
)
do
...
...
test/t/float.rb
View file @
52b2d092
...
...
@@ -9,7 +9,7 @@ assert('Float#+', '15.2.9.3.1') do
a
=
3.123456788
+
0.000000001
b
=
3.123456789
+
1
check_float
(
a
,
3.123456789
)
and
check_float
(
a
,
3.123456789
)
and
check_float
(
b
,
4.123456789
)
end
...
...
@@ -17,8 +17,8 @@ assert('Float#-', '15.2.9.3.2') do
a
=
3.123456790
-
0.000000001
b
=
5.123456789
-
1
check_float
(
a
,
3.123456789
)
and
check_float
(
b
,
4.123456789
)
check_float
(
a
,
3.123456789
)
and
check_float
(
b
,
4.123456789
)
end
assert
(
'Float#*'
,
'15.2.9.3.3'
)
do
...
...
@@ -47,17 +47,17 @@ end
assert
(
'Float#<=>'
,
'15.2.9.3.6'
)
do
a
=
3.123456789
<=>
3.123456788
b
=
3.123456789
<=>
3.123456789
b
=
3.123456789
<=>
3.123456789
c
=
3.123456789
<=>
3.123456790
a2
=
3.123456789
<=>
3
c2
=
3.123456789
<=>
4
a
==
1
and
b
==
0
and
c
==
-
1
and
a2
==
1
and
c2
==
-
1
end
assert
(
'Float#=='
,
'15.2.9.3.7'
)
do
3.1
==
3.1
and
not
(
3.1
==
3.2
)
3.1
==
3.1
and
not
3.1
==
3.2
end
assert
(
'Float#ceil'
,
'15.2.9.3.8'
)
do
...
...
@@ -74,7 +74,7 @@ assert('Float#floor', '15.2.9.3.10') do
end
assert
(
'Float#infinite?'
,
'15.2.9.3.11'
)
do
not
3.123456789
.
infinite?
and
not
3.123456789
.
infinite?
and
(
1.0
/
0.0
).
infinite?
end
...
...
test/t/hash.rb
View file @
52b2d092
...
...
@@ -169,17 +169,17 @@ assert('Hash#member?', '15.2.13.4.21') do
end
assert
(
'Hash#merge'
,
'15.2.13.4.22'
)
do
a
=
{
'abc_key'
=>
'abc_value'
,
'cba_key'
=>
'cba_value'
}
b
=
{
'cba_key'
=>
'XXX'
,
'xyz_key'
=>
'xyz_value'
}
a
=
{
'abc_key'
=>
'abc_value'
,
'cba_key'
=>
'cba_value'
}
b
=
{
'cba_key'
=>
'XXX'
,
'xyz_key'
=>
'xyz_value'
}
result_1
=
a
.
merge
b
result_2
=
a
.
merge
(
b
)
do
|
key
,
original
,
new
|
original
end
result_1
==
{
'abc_key'
=>
'abc_value'
,
'cba_key'
=>
'XXX'
,
result_1
==
{
'abc_key'
=>
'abc_value'
,
'cba_key'
=>
'XXX'
,
'xyz_key'
=>
'xyz_value'
}
and
result_2
==
{
'abc_key'
=>
'abc_value'
,
'cba_key'
=>
'cba_value'
,
result_2
==
{
'abc_key'
=>
'abc_value'
,
'cba_key'
=>
'cba_value'
,
'xyz_key'
=>
'xyz_value'
}
end
...
...
test/t/integer.rb
View file @
52b2d092
...
...
@@ -108,7 +108,7 @@ assert('Integer#downto', '15.2.8.3.15') do
3
.
downto
(
1
)
do
|
i
|
a
+=
i
end
a
==
6
a
==
6
end
assert
(
'Integer#eql?'
,
'15.2.8.3.16'
)
do
...
...
test/t/math.rb
View file @
52b2d092
...
...
@@ -10,7 +10,7 @@ assert('Math.sin PI/2') do
end
assert
(
'Fundamental trig identities'
)
do
assert
(
'Fundamental trig identities'
)
do
result
=
true
N
=
15
N
.
times
do
|
i
|
...
...
@@ -26,7 +26,7 @@ assert('Fundamental trig identities') do
result
&=
check_float
((
1
/
t
)
**
2
+
1
,
(
1
/
s
)
**
2
)
end
result
end
end
assert
(
'Math.erf 0'
)
do
check_float
(
Math
.
erf
(
0
),
0
)
...
...
test/t/string.rb
View file @
52b2d092
...
...
@@ -115,7 +115,7 @@ end
assert
(
'String#chop!'
,
'15.2.10.5.12'
)
do
a
=
''
b
=
'abc'
a
.
chop!
b
.
chop!
...
...
@@ -147,7 +147,7 @@ assert('String#each_line', '15.2.10.5.15') do
a
.
each_line
do
|
line
|
n_list
<<
line
end
list
==
n_list
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