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

Fixing more unit tests #142

Merged
merged 8 commits into from
May 31, 2021
Merged

Fixing more unit tests #142

merged 8 commits into from
May 31, 2021

Conversation

edleno2
Copy link
Contributor

@edleno2 edleno2 commented May 29, 2021

Description

  • Added new exception type FormatException so we can return same exception type as .net Core for Parse errors.
  • Upgraded tests to check for exception assertion of type FormatException.
  • Fixed a few exception assertions to be ArgumentOutOfRangeException to be compliant with .net core.
  • Cleaned up unit tests, removed debug statements for tests that have now been fixed, added messages to some Asserts to make locating the failing tests more easy.
  • Upgraded version to go with new nanoCLR checksum.
  • Added more tests for invalid Parse strings for integers and floating point numbers.

Motivation and Context

How Has This Been Tested?

Run with Win32 - with and without SUPPORT_ANY_BASE_CONVERSION defined. Run on ESP32-WROOM and STM32F429I-Discovery.

Screenshots

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)

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.

edleno2 and others added 5 commits May 19, 2021 15:07
Simple remark and set the IsSigned to false for the UInt64 convert method.  Just documentation since IsSigned would be set to false in the native code anyhow.

Removed and changed any tests that required the ToString() methods for double and float to handle their max values.  Most of the tests now look at the actual double/float as stored which uses the IEEE 574 format.  Hex display is used for actual asserts.

Added message lines to tests as needed to be able to tell which test was actually failing.

Fixes #715
Removed checks for hex values for some values since different platforms can calculate a double differently.  Cleaned up comments.

Fix #715
Added a new FormatException type to match .net core for errors in parsing to numbers.  In a few cases upgraded from an Exception to an ArgumentOutOfRangeException to match .net core.

Removed unneeded debug statements from tests that are now fixed.  In many cases added messages to tests so we can identify the soruce of a failed test.

Upgraded version of CoreLibrary to account for new FormatException type.  Goes with matching nanoCLR with new checksums and new version for mscorlib.

Fix #708
@josesimoes
Copy link
Member

Nice improvement!! 💯 👍🏻

edleno2 and others added 2 commits May 30, 2021 23:24
Added new FormatException to no-reflection project.  Cleaned up a few debug.writeline comments that are no longer needed.

Fix #708
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.

LGTM!

@josesimoes josesimoes merged commit 58b00dc into nanoframework:develop May 31, 2021
@josesimoes josesimoes changed the title Fixes for unit tests for CoreLibrary Fixing more unit tests May 31, 2021
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.

UnitTestParseTests.box_unbox_Test_1 fails
3 participants