switch to using boost::filesystem
[mussa.git] / alg / test / test_flp.cpp
index c3c9437a259fc8d68af8861ecf62ad3aae9f5a77..cc8500b16b8aabfa9cfb2eea6cf3f9b7dd5734eb 100644 (file)
@@ -4,12 +4,15 @@
 #include <boost/test/auto_unit_test.hpp>
 #include <boost/filesystem/operations.hpp>
 #include <boost/filesystem/path.hpp>
+namespace fs = boost::filesystem;
 
 #include "alg/flp.hpp"
 #include "alg/sequence.hpp"
 #include <iostream>
 #include <list>
 
+#include "mussa_exceptions.hpp"
+
 BOOST_AUTO_TEST_CASE( flp_simple )
 {
   FLPs f;
@@ -96,3 +99,10 @@ BOOST_AUTO_TEST_CASE( flp_reverse_compliment )
     // FIXME: should we test the individual lists?
   }
 }
+
+BOOST_AUTO_TEST_CASE( flp_file_check )
+{
+  fs::path filename = "Thy_micturations_are_to_me_as_plurdled_gabbleblotchits";
+  FLPs f1;
+  BOOST_CHECK_THROW( f1.load(filename), mussa_load_error);
+}