Fixed unit tests NFUnitTestConversions #141
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
In the unit tests added some more boundary test cases to include the values where the nanoprint.c will/will-not return 'oor' for out-of-range conditions. Added a double-to-hex to allow testing of values that are too big to be tested using ToString (due to the 'oor' above) and tested that double and float min/max generate bit values in the double/float that meet the IEEE 574 standard for floating numbers. Added messages in a few test cases just to be able to tell which test is failing since line numbers in the test framework are only to the method name.
Small change in System.Convert to correctly document that UInt64 is an unsigned value - native code already overrode the value passed to the method.
Motivation and Context
These changes clean up most of the unit test failures in CoreLibrary, putting us closer to turning on unit tests as part of the build/verify process. There are still failing unit tests in other areas of coreLibrary which will be addressed in a later pull request.
How Has This Been Tested?
Tested with Win32, STM32F429I-Discovery and ESP32-WROOM-32 using CoreLibrary units test NFUnitTestConversions. For Win32 ran all unit tests for the library to confirm no additional tests were broken.
Screenshots
Types of changes
Checklist: