more error messages for loading an annotation.
[mussa.git] / alg / test / test_mussa.cpp
index 4d966272ccb6592b30f1011410b9c458c1650184..16068473c01500185aedec71871fd90cd1818374 100644 (file)
@@ -161,6 +161,14 @@ BOOST_AUTO_TEST_CASE( mussa_mupa_is_file_not_directory )
   BOOST_CHECK_THROW(m1.load_mupa_file( curdir ), mussa_load_error );
 }
 
+// catch error if annotation isn't a file
+BOOST_AUTO_TEST_CASE( mussa_annotation_is_not_file )
+{
+  Mussa m1;
+  fs::path full_path(fs::path(EXAMPLE_DIR, fs::native) / "directory.mupa");
+  BOOST_CHECK_THROW( m1.load_mupa_file( full_path ), mussa_load_error );
+}
+
 BOOST_AUTO_TEST_CASE( mussa_load_analysis )
 {
   fs::path example_dir(EXAMPLE_DIR, fs::native);