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
60d2b51c
Commit
60d2b51c
authored
May 08, 2014
by
yui-knk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add tests for Range#to_s Range#inspect.
parent
c071ad13
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
0 deletions
+14
-0
test/t/range.rb
test/t/range.rb
+14
-0
No files found.
test/t/range.rb
View file @
60d2b51c
...
@@ -74,6 +74,20 @@ assert('Range#member?', '15.2.14.4.11') do
...
@@ -74,6 +74,20 @@ assert('Range#member?', '15.2.14.4.11') do
assert_false
a
.
member?
(
20
)
assert_false
a
.
member?
(
20
)
end
end
assert
(
'Range#to_s'
,
'15.2.14.4.12'
)
do
assert_equal
"0..1"
,
(
0
..
1
).
to_s
assert_equal
"0...1"
,
(
0
...
1
).
to_s
assert_equal
"a..b"
,
(
"a"
..
"b"
).
to_s
assert_equal
"a...b"
,
(
"a"
...
"b"
).
to_s
end
assert
(
'Range#inspect'
,
'15.2.14.4.13'
)
do
assert_equal
"0..1"
,
(
0
..
1
).
inspect
assert_equal
"0...1"
,
(
0
...
1
).
inspect
assert_equal
"
\"
a
\"
..
\"
b
\"
"
,
(
"a"
..
"b"
).
inspect
assert_equal
"
\"
a
\"
...
\"
b
\"
"
,
(
"a"
...
"b"
).
inspect
end
assert
(
'Range#eql?'
,
'15.2.14.4.14'
)
do
assert
(
'Range#eql?'
,
'15.2.14.4.14'
)
do
assert_true
(
1
..
10
).
eql?
(
1
..
10
)
assert_true
(
1
..
10
).
eql?
(
1
..
10
)
assert_false
(
1
..
10
).
eql?
(
1
..
100
)
assert_false
(
1
..
10
).
eql?
(
1
..
100
)
...
...
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