aria2/test/DefaultDiskWriterTest.cc
Tatsuhiro Tsujikawa 12988e5282 Replaced uint64_t with off_t or int64_t.
Since off_t is int64_t with LFS, we cannot take advantage of extra
capacity of uint64_t.
2011-12-09 21:39:43 +09:00

32 lines
593 B
C++

#include "DefaultDiskWriter.h"
#include <cppunit/extensions/HelperMacros.h>
namespace aria2 {
class DefaultDiskWriterTest:public CppUnit::TestFixture {
CPPUNIT_TEST_SUITE(DefaultDiskWriterTest);
CPPUNIT_TEST(testSize);
CPPUNIT_TEST_SUITE_END();
private:
public:
void setUp() {
}
void testSize();
};
CPPUNIT_TEST_SUITE_REGISTRATION( DefaultDiskWriterTest );
void DefaultDiskWriterTest::testSize()
{
DefaultDiskWriter dw(A2_TEST_DIR"/4096chunk.txt");
dw.enableReadOnly();
dw.openExistingFile();
CPPUNIT_ASSERT_EQUAL((off_t)4096LL, dw.size());
}
} // namespace aria2