diff --git a/src/mlpack/tests/main_tests/radical_test.cpp b/src/mlpack/tests/main_tests/radical_test.cpp index a44dbc5a57..e1cb10b1d0 100644 --- a/src/mlpack/tests/main_tests/radical_test.cpp +++ b/src/mlpack/tests/main_tests/radical_test.cpp @@ -120,13 +120,13 @@ BOOST_AUTO_TEST_CASE(RadicalBoundsTest) */ BOOST_AUTO_TEST_CASE(RadicalDiffNoiseStdDevTest) { - arma::mat input = { - {0.497369, 0.891621, 0.565789}, - {0.33821, 0.494571, 0.491079}, - {0.424898, 0.297599, 0.475061}, - {0.285009, 0.152635, 0.878107}, - {0.321474, 0.997979, 0.42137} - }; + std::string inputStr = "0.497369 0.891621 0.565789;"; + inputStr += "0.33821 0.494571 0.491079;"; + inputStr += "0.424898 0.297599 0.475061;"; + inputStr += "0.285009 0.152635 0.878107;"; + inputStr += "0.321474 0.997979 0.42137"; + + arma::mat input(inputStr); SetInputParam("input", input); @@ -153,13 +153,13 @@ BOOST_AUTO_TEST_CASE(RadicalDiffNoiseStdDevTest) */ BOOST_AUTO_TEST_CASE(RadicalDiffReplicatesTest) { - arma::mat input = { - {0.497369, 0.891621, 0.565789}, - {0.33821, 0.494571, 0.491079}, - {0.424898, 0.297599, 0.475061}, - {0.285009, 0.152635, 0.878107}, - {0.321474, 0.997979, 0.42137} - }; + std::string inputStr = "0.497369 0.891621 0.565789;"; + inputStr += "0.33821 0.494571 0.491079;"; + inputStr += "0.424898 0.297599 0.475061;"; + inputStr += "0.285009 0.152635 0.878107;"; + inputStr += "0.321474 0.997979 0.42137"; + + arma::mat input(inputStr); SetInputParam("input", input); @@ -186,13 +186,13 @@ BOOST_AUTO_TEST_CASE(RadicalDiffReplicatesTest) */ BOOST_AUTO_TEST_CASE(RadicalDiffAnglesTest) { - arma::mat input = { - {0.497369, 0.891621, 0.565789}, - {0.33821, 0.494571, 0.491079}, - {0.424898, 0.297599, 0.475061}, - {0.285009, 0.152635, 0.878107}, - {0.321474, 0.997979, 0.42137} - }; + std::string inputStr = "0.497369 0.891621 0.565789;"; + inputStr += "0.33821 0.494571 0.491079;"; + inputStr += "0.424898 0.297599 0.475061;"; + inputStr += "0.285009 0.152635 0.878107;"; + inputStr += "0.321474 0.997979 0.42137"; + + arma::mat input(inputStr); SetInputParam("input", input); @@ -219,13 +219,13 @@ BOOST_AUTO_TEST_CASE(RadicalDiffAnglesTest) */ BOOST_AUTO_TEST_CASE(RadicalDiffSweepsTest) { - arma::mat input = { - {0.497369, 0.891621, 0.565789}, - {0.33821, 0.494571, 0.491079}, - {0.424898, 0.297599, 0.475061}, - {0.285009, 0.152635, 0.878107}, - {0.321474, 0.997979, 0.42137} - }; + std::string inputStr = "0.497369 0.891621 0.565789;"; + inputStr += "0.33821 0.494571 0.491079;"; + inputStr += "0.424898 0.297599 0.475061;"; + inputStr += "0.285009 0.152635 0.878107;"; + inputStr += "0.321474 0.997979 0.42137"; + + arma::mat input(inputStr); SetInputParam("input", input);