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
36c9416b
Unverified
Commit
36c9416b
authored
Mar 22, 2019
by
Yukihiro "Matz" Matsumoto
Committed by
GitHub
Mar 22, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #4336 from shuujii/simplify-assert_step
Simplify `assert_step` in `test/t/numeric.rb`
parents
84241d3d
04fc2658
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
5 deletions
+3
-5
test/t/numeric.rb
test/t/numeric.rb
+3
-5
No files found.
test/t/numeric.rb
View file @
36c9416b
...
...
@@ -2,7 +2,7 @@
# Numeric ISO Test
assert
(
'Numeric'
,
'15.2.7'
)
do
assert_equal
Class
,
Numeric
.
class
assert_equal
(
Class
,
Numeric
.
class
)
end
assert
(
'Numeric#+@'
,
'15.2.7.4.1'
)
do
...
...
@@ -50,10 +50,8 @@ assert('Numeric#step') do
break
if
inf
&&
exp
.
size
==
act
.
size
end
expr
=
"
#{
receiver
.
inspect
}
.step(
#{
args
.
map
(
&
:inspect
).
join
(
', '
)
}
)"
msg
=
"
#{
expr
}
: counters"
diff
=
assertion_diff
(
exp
,
act
)
assert_true
exp
.
map
{
|
v
|
[
v
,
v
.
class
]}
==
act
.
map
{
|
v
|
[
v
,
v
.
class
]},
msg
,
diff
assert_same
receiver
,
ret
,
"
#{
expr
}
: return value"
unless
inf
assert_true
(
exp
.
eql?
(
act
),
"
#{
expr
}
: counters"
,
assertion_diff
(
exp
,
act
))
assert_same
(
receiver
,
ret
,
"
#{
expr
}
: return value"
)
unless
inf
end
assert_raise
(
ArgumentError
)
{
1
.
step
(
2
,
0
)
{
break
}
}
...
...
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