fix segfault when changing soft threshold when no analysis is loaded
[mussa.git] / alg / test / test_mussa.cxx
index a55b8b53624edc69351f67186f249504cfe8f82d..00cae241fd334af071a39f318ec9a5c4cb09dee2 100644 (file)
@@ -58,6 +58,19 @@ BOOST_AUTO_TEST_CASE( mussa_sequences )
   BOOST_CHECK_EQUAL( analysis.sequences()[2].get_seq(), s2);
 }
 
+// for some reason we can call nway once safely but it
+// somehow changed things and caused a segfault
+// fixed by adding a return statement in trans_path_search 
+BOOST_AUTO_TEST_CASE ( empty_mussa_set_threshold )
+{
+  Mussa m;
+  m.set_soft_thres(15);
+  m.nway();
+
+  m.set_soft_thres(25);
+  m.nway();
+}
+
 #include <unistd.h>
 BOOST_AUTO_TEST_CASE( mussa_load_mupa )
 {