aboutsummaryrefslogtreecommitdiff
path: root/tests/test/script
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test/script')
-rw-r--r--tests/test/script/runner/driver.cxx7
1 files changed, 5 insertions, 2 deletions
diff --git a/tests/test/script/runner/driver.cxx b/tests/test/script/runner/driver.cxx
index 10d5857..a82b083 100644
--- a/tests/test/script/runner/driver.cxx
+++ b/tests/test/script/runner/driver.cxx
@@ -38,17 +38,20 @@ main (int argc, char* argv[])
auto toi = [] (const string& s) -> int
{
+ int r (-1);
+
try
{
size_t n;
- int r (stoi (s, &n));
+ r = stoi (s, &n);
assert (n == s.size ());
- return r;
}
catch (const exception&)
{
assert (false);
}
+
+ return r;
};
if (o == "-i")