-
Notifications
You must be signed in to change notification settings - Fork 34
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
Align assertion statements; change some stderr to stdout and flush #322
Conversation
cerr << " " << (pass ? "" : "not ") << "ok " << ++mAssertCounter << " - " << description << endl; | ||
if (!pass) { | ||
if (pass) { | ||
cout << " ok " << ++mAssertCounter << " - " << description << endl << flush; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indentation is off here.
cerr << description << " " << lhsLabel << " " << opLabel << " " << rhsLabel << endl; | ||
if (!pass) { | ||
if (pass) { | ||
cout << " ok " << ++mAssertCounter << " - "; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indentation is off here.
@@ -22,6 +22,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/). | |||
- Update .gitattributes so we have consistent line endings | |||
- Change 266 files from CRLF to LF. | |||
- Run tests on push as well as on a pull request so developers can see impact | |||
- Align value indicators in assertion statements |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe I am being picky, but it would be great if you could split up the current commit (4bf8b53) into two separate commits, one for each entry here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you post a screenshot of the before/after alignment? I'm not sure what this change is addressing
|
||
#define assertEqualFloat(arg1, arg2, arg3) arduinoCIAssertOp("EqualFloat", "epsilon", arg3, compareMoreOrEqual, ">=", "actualDifference", fabs(arg1 - arg2)) | ||
#define assertNotEqualFloat(arg1, arg2, arg3) arduinoCIAssertOp("NotEqualFloat", "epsilon", arg3, compareLessOrEqual, "<=", "insufficientDifference", fabs(arg1 - arg2)) | ||
#define assertEqualFloat(arg1, arg2, arg3) arduinoCIAssertOp("EqualFloat", " epsilon", arg3, compareMoreOrEqual, ">=", "actualDifference", fabs(arg1 - arg2)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should either add some comments explaining how the extra spaces work, or possibly work around it entirely by making it part of the macro.
Please convert tabs to spaces in your code |
Let's delay merging this until we get more discussion on #321. I'd also like some reassurance that I don't mean to be pedantic about this, but the original code I wrote use In other words, |
I think I'll take just the indentation and apply suggested changes in a new PR, while holding off on the |
Highlights from
CHANGELOG.md
Issues Fixed