Merge branch '2.0' of ssh://main.carlh.net/home/carl/git/dcpomatic into 2.0
[dcpomatic.git] / test / file_group_test.cc
index 025d6be02d49a9c02d67f5a82dff579381d705ac..888834511677c8d95f7cffa76a2c921b0dc3fff9 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2013 Carl Hetherington <cth@carlh.net>
+    Copyright (C) 2013-2014 Carl Hetherington <cth@carlh.net>
 
     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
 
 */
 
+/** @file  test/file_group_test.cc
+ *  @brief Check that FileGroup works.
+ */
+
 #include <stdint.h>
 #include <cstdio>
 #include <boost/test/unit_test.hpp>
 #include <boost/filesystem.hpp>
-extern "C" {
-#include <libavformat/avio.h>
-}
 #include "lib/file_group.h"
 
 using std::vector;
@@ -65,8 +66,7 @@ BOOST_AUTO_TEST_CASE (file_group_test)
                base += length[i];
        }
 
-       FileGroup fg;
-       fg.set_paths (name);
+       FileGroup fg (name);
        uint8_t test[65536];
 
        int pos = 0;
@@ -107,7 +107,4 @@ BOOST_AUTO_TEST_CASE (file_group_test)
        BOOST_CHECK_EQUAL (fg.seek (1077, SEEK_END), total_length - 1077);
        BOOST_CHECK_EQUAL (fg.read (test, 256), 256);
        BOOST_CHECK_EQUAL (memcmp (data + total_length - 1077, test, 256), 0);
-
-       /* AVSEEK_SIZE */
-       BOOST_CHECK_EQUAL (fg.seek (-1, AVSEEK_SIZE), total_length);
 }