Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Test Stream::parseFloat() with many input digits #133

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

Merged
aentinger merged 7 commits into arduino:master from edgar-bonet:many-digits
Jan 25, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Test Stream::parseFloat() with a large number
  • Loading branch information
edgar-bonet committed Dec 14, 2020
commit 5445db39345f62acbdf51c3835ea9c0b512fb5dc
7 changes: 6 additions & 1 deletion test/src/Stream/test_parseFloat.cpp
View file Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,16 @@ TEST_CASE ("Testing parseFloat(LookaheadMode lookahead = SKIP_ALL, char ignore =
mock << "\r\n\t 12.34";
REQUIRE(mock.parseFloat() == 12.34f);
}
WHEN ("A float is provided with too many digits")
WHEN ("A float is provided with too many digits after the decimal point")
{
mock << "3.1415926535897932384";
REQUIRE(mock.parseFloat() == Approx(3.141592654f));
}
WHEN ("A float is larger than LONG_MAX")
{
mock << "602200000000000000000000.00";
REQUIRE(mock.parseFloat() == Approx(6.022e23f));
}
}

TEST_CASE ("Testing parseFloat(LookaheadMode lookahead = SKIP_NONE, char ignore = NO_IGNORE_CHAR)", "[Stream-parseFloat-02]")
Expand Down

AltStyle によって変換されたページ (->オリジナル) /