Skip to content

Commit

Permalink
tester: changed local instances to member variables
Browse files Browse the repository at this point in the history
the local run function translator, program unit and recreator instances
were changed to member pointer variables along with the output stream so
that they don't need to be passed around between the tester functions;
also did some minor cleanup
  • Loading branch information
thunder422 committed Nov 16, 2013
1 parent b1c7dc5 commit 2dc4b17
Show file tree
Hide file tree
Showing 3 changed files with 100 additions and 90 deletions.
5 changes: 3 additions & 2 deletions commandline.cpp
Expand Up @@ -68,16 +68,17 @@ CommandLine::CommandLine(const QStringList &args)
return;
}

Tester tester(args);
Tester tester(args, cout());
if (tester.hasError())
{
coutClose(); // close stdout
cout(stderr) << tester.errorMessage() << endl;
m_returnCode = 1;
return;
}
else if (tester.hasOption())
{
if (tester.run(cout(), this))
if (tester.run(this))
{
m_returnCode = 0;
}
Expand Down

0 comments on commit 2dc4b17

Please sign in to comment.