}
}
+#include <unistd.h>
+BOOST_AUTO_TEST_CASE( nway_refine )
+{
+ Mussa m1;
+ m1.load_mupa_file( "examples/mck3test.mupa" );
+ m1.analyze(0, 0);
+ const NwayPaths& npath = m1.paths();
+ BOOST_CHECK_EQUAL (npath.path_size(), npath.refined_path_size());
+ size_t first_refined_size = npath.refined_path_size();
+ BOOST_CHECK( first_refined_size > 0 );
+
+ // we're using a window size 30 (threshold 20) example
+ m1.set_soft_thres(22);
+ m1.nway();
+ BOOST_CHECK( npath.refined_path_size() > 0);
+ BOOST_CHECK( npath.refined_path_size() < first_refined_size);
+ m1.set_soft_thres(20);
+ m1.nway();
+ BOOST_CHECK_EQUAL(npath.refined_path_size(), first_refined_size);
+}