javarosa
javarosa copied to clipboard
#555
Added test to test XPathFuncExpr.toString, toNumber, etc when passing a GeoPointData instance.
Closes #555
What has been done to verify that this works as intended?
Why is this the best possible solution? Were any other approaches considered?
How does this change affect users? Describe intentional changes to behavior and behavior that could have accidentally been affected by code changes. In other words, what are the regression risks?
Do we need any specific form for testing your changes? If so, please attach one.
Does this change require updates to documentation? If so, please file an issue here and include the link below.
Seems like toNumber(geopoint) is working correctly (returning the accuracy value). Even if the Geopoint is not valid, it returns 9999999.0. I'm also a bit confused on the suggestion that GeoPointData should not implement IExprDataType but should be implemented by the data returned by GeoPointData. I don't see how that could be since the data returned by GeoPointData are built in types. It seems that the combination of the logic in XPathFuncExpr.toXXXXX and the GeoPointData.toXXXXX are effective.
Codecov Report
Merging #598 into master will increase coverage by
0.03%
. The diff coverage isn/a
.
@@ Coverage Diff @@
## master #598 +/- ##
============================================
+ Coverage 54.68% 54.72% +0.03%
- Complexity 3218 3222 +4
============================================
Files 242 242
Lines 13320 13320
Branches 2562 2562
============================================
+ Hits 7284 7289 +5
+ Misses 5230 5226 -4
+ Partials 806 805 -1
Impacted Files | Coverage Ξ | Complexity Ξ | |
---|---|---|---|
.../java/org/javarosa/core/model/utils/DateUtils.java | 59.26% <0.00%> (+0.28%) |
77.00% <0.00%> (+1.00%) |
|
...ava/org/javarosa/core/model/data/GeoPointData.java | 65.57% <0.00%> (+6.55%) |
17.00% <0.00%> (+3.00%) |
Continue to review full report at Codecov.
Legend - Click here to learn more
Ξ = absolute <relative> (impact)
,ΓΈ = not affected
,? = missing data
Powered by Codecov. Last update 9a1ddc6...0d3233b. Read the comment docs.