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
ed32b6fc
Unverified
Commit
ed32b6fc
authored
4 years ago
by
Yukihiro "Matz" Matsumoto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update tests for integer division.
parent
c8cf9512
master
removing-y-tab-c
revert-5391-throw
stable
3.1.0-rc
3.0.0
3.0.0-rc
3.0.0-preview
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
mrbgems/mruby-complex/test/complex.rb
mrbgems/mruby-complex/test/complex.rb
+2
-2
test/t/numeric.rb
test/t/numeric.rb
+1
-1
No files found.
mrbgems/mruby-complex/test/complex.rb
View file @
ed32b6fc
...
...
@@ -56,8 +56,8 @@ end
assert
'Complex#/'
do
assert_complex
Complex
(
2
,
3
)
/
Complex
(
2
,
3
)
,
(
1
+
0
i
)
assert_complex
Complex
(
900
)
/
Complex
(
1
)
,
(
900
+
0
i
)
assert_complex
Complex
(
-
2
,
9
)
/
Complex
(
-
9
,
2
),
((
36
/
85
)
-
(
77
i
/
85
))
assert_complex
Complex
(
9
,
8
)
/
4
,
((
9
/
4
)
+
2
i
)
assert_complex
Complex
(
-
2
,
9
)
/
Complex
(
-
9
,
2
),
((
36
.0
/
85
)
-
(
77
i
/
85
))
assert_complex
Complex
(
9
,
8
)
/
4
,
((
9
.0
/
4
)
+
2
i
)
assert_complex
Complex
(
20
,
9
)
/
9.8
,
(
2.0408163265306123
+
0.9183673469387754
i
)
if
1e39
.
infinite?
then
# MRB_USE_FLOAT32 in effect
...
...
This diff is collapsed.
Click to expand it.
test/t/numeric.rb
View file @
ed32b6fc
...
...
@@ -36,7 +36,7 @@ assert('Numeric#/', '15.2.8.3.4') do
n
=
Class
.
new
(
Numeric
){
def
/
(
x
);
15.1
;
end
}.
new
assert_equal
(
2
,
10
/
5
)
assert_equal
(
0
.0625
,
1
/
16
)
assert_equal
(
0
,
1
/
16
)
assert_equal
(
15.1
,
n
/
10
)
assert_raise
(
TypeError
){
1
/
n
}
assert_raise
(
TypeError
){
1
/
nil
}
...
...
This diff is collapsed.
Click to expand it.
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