Skip to content

Commit

Permalink
Fix CLI tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
rcurtin committed Aug 15, 2017
1 parent 39f9999 commit c3be5ff
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/mlpack/core/util/cli.cpp
Expand Up @@ -255,7 +255,7 @@ void CLI::ClearSettings()
while (it2 != GetSingleton().aliases.end())
{
// Is this an alias to a persistent parameter?
if (GetSingleton().parameters.count(it2->second) > 0)
if (persistent.count(it2->second) > 0)
persistentAliases[it2->first] = it2->second; // Save it.

++it2;
Expand Down
1 change: 1 addition & 0 deletions src/mlpack/tests/cli_binding_test.cpp
Expand Up @@ -30,6 +30,7 @@ BOOST_AUTO_TEST_SUITE(CLIBindingTest);
*/
BOOST_AUTO_TEST_CASE(CLIOptionTest)
{
CLI::ClearSettings();
CLIOption<double> co1(0.0, "test", "test2", "t", "double", false, true,
false);

Expand Down
1 change: 1 addition & 0 deletions src/mlpack/tests/python_binding_test.cpp
Expand Up @@ -37,6 +37,7 @@ BOOST_AUTO_TEST_SUITE(PythonBindingsTest);
*/
BOOST_AUTO_TEST_CASE(PyOptionTest)
{
CLI::ClearSettings();
programName = "test";
PyOption<double> po1(0.0, "test", "test2", "t", "double", false, true, false);

Expand Down

0 comments on commit c3be5ff

Please sign in to comment.