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

Fix float TryParse #172

Merged
merged 2 commits into from
Jan 23, 2022
Merged

Fix float TryParse #172

merged 2 commits into from
Jan 23, 2022

Conversation

mboud
Copy link
Contributor

@mboud mboud commented Jan 23, 2022

Description

  • Fixed wrong value of throwException boolean parameter for Convert.NativeToDouble call from Single.cs'sTryParse.
  • Added tests for float conversion by copying existing double tests.

Motivation and Context

How Has This Been Tested?

  • See Unit Tests

Types of changes

  • Improvement (non-breaking change that improves a feature, code or algorithm)
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Config and build (change in the configuration and build system, has no impact on code or features)
  • Dependencies (update dependencies and changes associated, has no impact on code or features)
  • Unit Tests (work on Unit Tests, has no impact on code or features)
  • Documentation (changes or updates in the documentation, has no impact on code or features)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

mboude added 2 commits January 23, 2022 15:51
Fix #954

Signed-off-by: Matthieu Boudé <docker47@gmail.com>
Signed-off-by: Matthieu Boudé <docker47@gmail.com>
@dnfadmin
Copy link

dnfadmin commented Jan 23, 2022

CLA assistant check
All CLA requirements met.

Copy link
Member

@josesimoes josesimoes left a comment

Choose a reason for hiding this comment

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

Nice catch! Thanks for the fix.

@josesimoes josesimoes merged commit b9dd389 into nanoframework:develop Jan 23, 2022
@nfbot
Copy link
Member

nfbot commented Jan 23, 2022

@mboud thank you again for your contribution! 🙏😄

.NET nanoFramework it's all about community involvement and no contribution is too small.
We would like to invite you to join the project Contributors list.

Please edit it and add an entry with your GitHub user in the appropriate location (names sorted alphabetically):

  <tr>
    <td><img src="https://github.com/mboud.png?size=50&" height="50" width="50" ></td>
    <td><a href="https://github.com/mboud">MBoude</a></td>
  </tr>

(feel free to adjust your name, if it's not correct)

@josesimoes josesimoes changed the title Fix float tryparse and add float parse tests Fix float TryParse Jan 23, 2022
@mboud mboud deleted the fix-float-tryparse branch January 23, 2022 20:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

float.TryParse mistakenly throws System.FormatException
4 participants