View sequence alignment at non default thresholds
[mussa.git] / alg / test / test_nway.cpp
index d67753c0aeb3e01e40713d8426e5deb4d701306d..53508dfe1b121c3ea22d783fdb716d9ed2de0aa6 100644 (file)
@@ -55,4 +55,24 @@ BOOST_AUTO_TEST_CASE( nway_test )
   }
 }
 
+#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);
+}