-
Notifications
You must be signed in to change notification settings - Fork 525
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refact(core): support Infinity & NaN number in float/double property #1578
Conversation
1. due to this, float support the value > Float.MAX (trate as Infinity), so as the double 2. add test case in client (later) PS: Shall we delete old test cases directly
Codecov Report
@@ Coverage Diff @@
## master #1578 +/- ##
============================================
+ Coverage 63.26% 63.28% +0.02%
- Complexity 6703 6704 +1
============================================
Files 418 418
Lines 34449 34449
Branches 4765 4764 -1
============================================
+ Hits 21793 21800 +7
+ Misses 10407 10402 -5
+ Partials 2249 2247 -2
Continue to review full report at Codecov.
|
hugegraph-core/src/main/java/com/baidu/hugegraph/type/define/DataType.java
Outdated
Show resolved
Hide resolved
@@ -462,13 +467,13 @@ public void testTypeFloat() { | |||
1f, 3f, 3f, 127f, 128f)); | |||
|
|||
Assert.assertThrows(IllegalArgumentException.class, () -> { | |||
property("float", Double.MAX_VALUE); | |||
property("float", 'a'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what's the behavior of property("float", Double.MAX_VALUE)? can also test it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
treat as Infinity
. add a assertEquals for it
Fix #1575 :
PS: Shall we delete old test cases directly