#define BOOST_TEST_DYN_LINK
#define BOOST_TEST_MODULE libsub_test
#include <boost/test/unit_test.hpp>
+#include <boost/filesystem.hpp>
#include <fstream>
#include <string>
+#include "iso6937_tables.h"
using std::string;
+using std::cerr;
using std::ifstream;
using std::getline;
-string private_test;
+boost::filesystem::path private_test;
struct TestConfig
{
} else {
BOOST_TEST_MESSAGE ("Private data libsub-test-private not found; some tests will not run");
}
+
+ sub::make_iso6937_tables ();
}
};
BOOST_GLOBAL_FIXTURE (TestConfig);
void
-check_text (string a, string b)
+check_text (boost::filesystem::path a, boost::filesystem::path b)
{
+ if (!boost::filesystem::exists (a)) {
+ cerr << "File not found: " << a << "\n";
+ }
+
+ if (!boost::filesystem::exists (b)) {
+ cerr << "File not found: " << b << "\n";
+ }
+
+ BOOST_CHECK (boost::filesystem::exists (a));
+ BOOST_CHECK (boost::filesystem::exists (b));
+
ifstream p (a.c_str ());
ifstream q (b.c_str ());