Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Correctly return early if the StructABI test fails#18529

Merged
jashook merged 1 commit into
dotnet:masterfrom
jashook:fix_struct_abi_test
Jun 18, 2018
Merged

Correctly return early if the StructABI test fails#18529
jashook merged 1 commit into
dotnet:masterfrom
jashook:fix_struct_abi_test

Conversation

@jashook
Copy link
Copy Markdown

@jashook jashook commented Jun 18, 2018

@jashook jashook requested a review from BruceForstall June 18, 2018 18:03
@jashook jashook changed the title Correctly return early if the test fails Correctly return early if the StructABI test fails Jun 18, 2018
Copy link
Copy Markdown

@BruceForstall BruceForstall left a comment

Choose a reason for hiding this comment

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

That would work, but it also fails when at the failure of the first test. I would prefer all tests run (and possibly fail), and the final return code be -1 if any test fails.

E.g.,

bool allOk = true;

ok = case1();
if (!ok) allOk = false;

ok = case2();
if (!ok) allOk = false;

etc.

or, more simply,

ok = true;
if (!case1()) ok = false;
if (!case2()) ok = false;
...

@jashook
Copy link
Copy Markdown
Author

jashook commented Jun 18, 2018

Ok will make the change.

@jashook jashook force-pushed the fix_struct_abi_test branch from f798371 to b8b349c Compare June 18, 2018 18:32
@jashook
Copy link
Copy Markdown
Author

jashook commented Jun 18, 2018

@BruceForstall ptal

@jashook jashook merged commit a74bbaf into dotnet:master Jun 18, 2018
ok = EnoughRegistersSysV3Wrapper();
ok = EnoughRegistersSysV4Wrapper();

if (!EchoSingleByteWrapper()) ok = false;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

A nit - how about just ok &= EchoSingleLongWrapper(); etc?

picenka21 pushed a commit to picenka21/runtime that referenced this pull request Feb 18, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants