/*
- 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;
base += length[i];
}
- FileGroup fg;
- fg.set_paths (name);
+ FileGroup fg (name);
uint8_t test[65536];
int pos = 0;
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);
}