From ce40f285f301d70e125020b486b0e9ffdf82d349 Mon Sep 17 00:00:00 2001 From: winsvega Date: Tue, 5 May 2015 18:15:26 +0300 Subject: Solidity: cryptographic ecrecover test --- TestHelper.cpp | 12 +++++------- TestHelper.h | 4 ++-- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/TestHelper.cpp b/TestHelper.cpp index 9e997c49..144a1a28 100644 --- a/TestHelper.cpp +++ b/TestHelper.cpp @@ -715,11 +715,10 @@ Options::Options() vmtrace = true; else if (arg == "--filltests") fillTests = true; - else if (arg.compare(0, 7, "--stats") == 0) + else if (arg == "--stats" && i + 1 < argc) { stats = true; - if (arg.size() > 7) - statsOutFile = arg.substr(8); // skip '=' char + statsOutFile = argv[i + 1]; } else if (arg == "--performance") performance = true; @@ -741,11 +740,10 @@ Options::Options() inputLimits = true; bigData = true; } - else if (arg.compare(0, 12, "--singletest") == 0) + else if (arg == "--singletest" && i + 1 < argc) { - singletest = true; - if (arg.size() > 12) - singletestName = arg.substr(13); // skip '=' char + singleTest = true; + singleTestName = argv[i + 1]; } } } diff --git a/TestHelper.h b/TestHelper.h index 6d234abe..02f509e4 100644 --- a/TestHelper.h +++ b/TestHelper.h @@ -188,8 +188,8 @@ public: /// Test selection /// @{ - bool singletest = false; - std::string singletestName; + bool singleTest = false; + std::string singleTestName; bool performance = false; bool quadratic = false; bool memory = false; -- cgit v1.2.3