fix uninitialized pointer
[mussa.git] / alg / test / test_mussa.cpp
index 16068473c01500185aedec71871fd90cd1818374..55188eab8052b9e128d4470d2dd33ef1911644ec 100644 (file)
@@ -152,6 +152,17 @@ BOOST_AUTO_TEST_CASE( mussa_load_full_path )
   BOOST_CHECK_EQUAL( m1.is_dirty(), true);
   BOOST_CHECK_EQUAL( m1.get_analysis_path().string(), "");
 }
+  
+BOOST_AUTO_TEST_CASE( mussa_valid_motifs_in_new_analysis )
+{
+  Mussa m1;
+  fs::path full_path(fs::path(EXAMPLE_DIR, fs::native) / "mck3test.mupa");
+  m1.load_mupa_file( full_path );
+  m1.analyze();
+  // check motifs
+  BOOST_CHECK( m1.sequences().size() > 0 );
+  BOOST_CHECK_EQUAL( m1.sequences()[0]->motifs().size(), 0 );  
+}
 
 // make sure we know that mupa files cannot be directories 
 BOOST_AUTO_TEST_CASE( mussa_mupa_is_file_not_directory )