diff options
| author | Carl Hetherington <cth@carlh.net> | 2014-01-22 19:42:39 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2014-01-22 19:42:39 +0000 |
| commit | 1c724e363a644abaee7efb39d6091e7b30de0fb6 (patch) | |
| tree | 413e28533849835f8496c8c972bd26e1d27aefbe /test/test.cc | |
| parent | 1e9f115b7cda68ccba99f58d194a2c0eb83e7e23 (diff) | |
Various work.
Diffstat (limited to 'test/test.cc')
| -rw-r--r-- | test/test.cc | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/test.cc b/test/test.cc index f693467e..ff018cd5 100644 --- a/test/test.cc +++ b/test/test.cc @@ -21,6 +21,7 @@ #define BOOST_TEST_MODULE libdcp_test #include <boost/test/unit_test.hpp> #include "util.h" +#include "test.h" using std::string; @@ -48,3 +49,17 @@ wav (dcp::Channel) string test_corpus = "../libdcp-test"; +TestFile::TestFile (boost::filesystem::path file) +{ + _size = boost::filesystem::file_size (file); + _data = new uint8_t[_size]; + FILE* f = dcp::fopen_boost (file, "r"); + assert (f); + fread (_data, 1, _size, f); + fclose (f); +} + +TestFile::~TestFile () +{ + delete[] _data; +} |
