Mussa aligned sequence view seems to work
[mussa.git] / alg / test / test_conserved_path.cpp
index ec1b54cde5fec5a872ea2819d10d7539e31045a6..7050a73a11bfc5b4e625d4cc76c22fcda51ac5a5 100644 (file)
@@ -137,3 +137,25 @@ BOOST_AUTO_TEST_CASE ( extended_conserved_path_growth )
   ecp_base.extend(growth);
   BOOST_CHECK_EQUAL( ecp_base.window_size, window_size + growth );
 }
+
+BOOST_AUTO_TEST_CASE ( extended_conserved_normalized ) 
+{
+  vector<int> path;
+  path += 3,-14,5,-19; // magic from boost assign
+  vector<int> normalized_path;
+  normalized_path += 3,4, 5,9;
+
+  ExtendedConservedPath ecp1;
+  ecp1.window_size = 10;
+  ecp1.score = 18;
+  ecp1.track_indexes = path;
+  BOOST_CHECK_EQUAL ( ecp1.size(), path.size() );
+
+  vector<ConservedPath::path_element> normalized_index(ecp1.normalizedIndexes());
+  for(int i=0; i != ecp1.size(); ++i)
+  {
+    BOOST_CHECK_EQUAL(normalized_index[i], normalized_path[i]);
+  }
+}
+