diff --git a/src/mlpack/tests/main_tests/hmm_train_test.cpp b/src/mlpack/tests/main_tests/hmm_train_test.cpp index b35149912d..889d6f891f 100644 --- a/src/mlpack/tests/main_tests/hmm_train_test.cpp +++ b/src/mlpack/tests/main_tests/hmm_train_test.cpp @@ -386,14 +386,16 @@ BOOST_AUTO_TEST_CASE(HMMTrainRetrainTest3) type = "gaussian"; SetInputParam("input_file", std::move(inputObsFile2)); - // Provide a labels file with more states than initially specified SetInputParam("labels_file", std::move(inputLabFile2)); SetInputParam("type", std::move(type)); SetInputParam("input_model", CLI::GetParam("output_model")); - CLI::GetSingleton().Parameters()["type"].wasPassed = false; CLI::GetSingleton().Parameters()["states"].wasPassed = false; + mlpackMain(); + // Note that when emission type is changed -- like in this test, a warning + // is printed stating that the new type is being ignored (no error is raised) + HMMModel h2 = *(CLI::GetParam("output_model")); BOOST_REQUIRE(h1.Type() == DiscreteHMM);