Skip to content

#555 - #598

Open
macdude357 wants to merge 1 commit into
getodk:masterfrom
macdude357:bugfix/AddTestForToNumber
Open

#555#598
macdude357 wants to merge 1 commit into
getodk:masterfrom
macdude357:bugfix/AddTestForToNumber

Conversation

@macdude357

Copy link
Copy Markdown
Contributor

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.

Added test to test XPathFuncExpr.toString, toNumber, etc when passing a
GeoPointData instance.
@macdude357

Copy link
Copy Markdown
Contributor Author

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-commenter

codecov-commenter commented Sep 16, 2020

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 54.72%. Comparing base (9a1ddc6) to head (0d3233b).
⚠️ Report is 563 commits behind head on master.

Additional details and impacted files
@@             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     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

number(geopoint) returns empty string

2 participants