This repository was archived by the owner on Oct 28, 2021. It is now read-only.
Change exit calls to returns in testeth, closes #4667#4971
Open
Grubbly wants to merge 2 commits intoethereum:masterfrom
Open
Change exit calls to returns in testeth, closes #4667#4971Grubbly wants to merge 2 commits intoethereum:masterfrom
Grubbly wants to merge 2 commits intoethereum:masterfrom
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #4971 +/- ##
===========================================
+ Coverage 61.1% 61.17% +0.07%
===========================================
Files 350 350
Lines 28298 28291 -7
Branches 2886 2889 +3
===========================================
+ Hits 17291 17308 +17
+ Misses 10048 10021 -27
- Partials 959 962 +3 |
winsvega
approved these changes
Apr 24, 2018
pirapira
suggested changes
Apr 24, 2018
| std::cerr << TestOutputHelper::get().testName() + " Specified Network not found: " | ||
| << _network << "\n"; | ||
| exit(1); | ||
| return; |
Member
There was a problem hiding this comment.
The caller of this function should terminate the test when this happens.
| { | ||
| printHelp(); | ||
| exit(0); | ||
| return; |
Member
There was a problem hiding this comment.
Make sure that the process terminates when this constructor takes this path.
| { | ||
| printVersion(); | ||
| exit(0); | ||
| return; |
Member
There was a problem hiding this comment.
Make sure that the process terminates after the execution takes this path.
Member
There was a problem hiding this comment.
You can throw an exception instead of silently returning.
| #else | ||
| cerr << "--vmtrace option requires a build with cmake -DVMTRACE=1\n"; | ||
| exit(1); | ||
| return; |
Member
There was a problem hiding this comment.
Make sure that the process terminates after the execution takes this path.
| { | ||
| std::cerr << "Options file not found! Default options at: tests/src/randomCodeOptions.json\n"; | ||
| exit(0); | ||
| return; |
| { | ||
| cerr << "Argument for the option is invalid! (use range: 1...1000)\n"; | ||
| exit(1); | ||
| return; |
| test::RandomCodeOptions options; | ||
| cout << test::RandomCode::get().generate(maxCodes, options) << "\n"; | ||
| exit(0); | ||
| return; |
| { | ||
| cerr << "Unknown option: " + arg << "\n"; | ||
| exit(1); | ||
| return; |
| "trValueIndex, trGasIndex, trDataIndex, nonetwork, singleTest, all, " << | ||
| "stats, filltests, fillchain \n"; | ||
| exit(1); | ||
| return; |
| { | ||
| std::cerr << *boost::get_error_info<errinfo_comment>(e) << "\n"; | ||
| exit(1); | ||
| return 1; |
Contributor
|
@chfast what are the plans for testeth in cpp client ? |
Member
|
@winsvega I don't have any. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
return should be used over exit calls because return guarentees the destructor is called for locally scoped objects.