make really sure load_mupa has a file to parse.
[mussa.git] / alg / test / test_mussa.cpp
index 3a850367f1d9b109a1f23cde12ac3285a05b7081..d8b2ab51fdbf00b3d43db1f6387c25c5ee09c2a6 100644 (file)
@@ -11,6 +11,7 @@ namespace assign = boost::assign;
 #include <vector>
 
 #include "alg/mussa.hpp"
+#include "mussa_exceptions.hpp"
 
 using namespace std;
 
@@ -119,6 +120,13 @@ BOOST_AUTO_TEST_CASE( mussa_load_full_path )
   BOOST_CHECK_EQUAL( m1.get_threshold(), 20);
 }
 
+BOOST_AUTO_TEST_CASE( mussa_mupa_directory )
+{
+  fs::path curdir(".");
+  Mussa m1;
+  BOOST_CHECK_THROW(m1.load_mupa_file( curdir ), mussa_load_error );
+}
+
 BOOST_AUTO_TEST_CASE( mussa_load_analysis )
 {
   fs::path example_dir(EXAMPLE_DIR, fs::native);