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
c302b86f
Commit
c302b86f
authored
May 10, 2014
by
Yukihiro "Matz" Matsumoto
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2220 from yui-knk/refactor-test
Refactoring test to use assert_nothing_raised.
parents
48ac1f74
faee6987
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
7 deletions
+11
-7
test/t/exception.rb
test/t/exception.rb
+6
-6
test/t/string.rb
test/t/string.rb
+5
-1
No files found.
test/t/exception.rb
View file @
c302b86f
...
...
@@ -345,13 +345,13 @@ assert('Exception#inspect without message') do
end
assert
(
'Exception#backtrace'
)
do
begin
raise
"get backtrace"
rescue
=>
e
e
.
backtrace
assert_nothing_raised
do
begin
raise
"get backtrace"
rescue
=>
e
e
.
backtrace
end
end
true
end
assert
(
'Raise in ensure'
)
do
...
...
test/t/string.rb
View file @
c302b86f
...
...
@@ -476,7 +476,11 @@ assert('String#upcase!', '15.2.10.5.43') do
end
assert
(
'String#inspect'
,
'15.2.10.5.46'
)
do
(
"
\1
"
*
100
).
inspect
# should not raise an exception - regress #1210
# should not raise an exception - regress #1210
assert_nothing_raised
do
(
"
\1
"
*
100
).
inspect
end
assert_equal
"
\"\\
000
\"
"
,
"
\0
"
.
inspect
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