Skip to content
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

Allow exponents for numeric cell values #901

Merged

Conversation

igitur
Copy link
Contributor

@igitur igitur commented Feb 26, 2021

Follow-up to #890 . This fixes a validation issue where numbers in exponential format were not recognised.

@twsouthwick
Copy link
Member

Thanks! Can you add some tests to the parsing tests as well?

@igitur
Copy link
Contributor Author

igitur commented Feb 26, 2021

I did add 2 tests. Do you require any further tests?

@twsouthwick
Copy link
Member

Those tests are for the validation. There's also tests for CellValue itself for the TryGet... methods that it would be good to have these as well. They currently just take the value, so you may need to expand the theories to take in the string and the expected value.

@igitur igitur force-pushed the allow-exponential-for-double-cell-values branch from b683107 to 19ab10a Compare February 27, 2021 10:25
@igitur
Copy link
Contributor Author

igitur commented Feb 27, 2021

Ah, I see what you mean. I created new tests that accept a string. Passing a number in exponential format into the existing tests didn't always result in the expected action, as 3E+4 will implicitly convert to 30000. Well, if they're of type double it's the same number, but I think you know what I mean.

Copy link
Member

@twsouthwick twsouthwick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks for the extra tests!

@twsouthwick twsouthwick merged commit 43be185 into dotnet:main Mar 7, 2021
@igitur igitur deleted the allow-exponential-for-double-cell-values branch March 7, 2021 21:26
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.

None yet

2 participants