summaryrefslogtreecommitdiff
path: root/test/SingleFileAllocationIteratorTest.cc
Commit message (Collapse)AuthorAgeFilesLines
* make clang-format using clang-format-3.6Tatsuhiro Tsujikawa2015-12-271-6/+5
|
* Use user-defined literal for k, m, and g (powers of 1024)Tatsuhiro Tsujikawa2015-06-211-4/+6
|
* Use int64_t instead of off_tTatsuhiro Tsujikawa2012-07-231-2/+2
| | | | | | | | Using off_t, at least, in DiskAdaptor layer is problematic because torrent can contain under 2GiB files but total sum of those files may exceed 2GiB limit, which makes off_t overflow in 32 bit system without large file support. So we use int64_t in API. We'll check the file length before download so that it does not exceed max off_t.
* Use int64_t instead of off_tTatsuhiro Tsujikawa2012-06-251-2/+2
| | | | | Some classes such as DiskAdaptor, DiskWriter, FileAllocationIterator and ChecksumValidator are left unchanged.
* Replaced uint64_t with off_t or int64_t.Tatsuhiro Tsujikawa2011-12-091-4/+4
| | | | | Since off_t is int64_t with LFS, we cannot take advantage of extra capacity of uint64_t.
* Made `make distcheck' pass.Tatsuhiro Tsujikawa2010-12-021-1/+1
| | | | | | We added 2 macros A2_TEST_DIR and A2_TEST_OUT_DIR to pass tests in `make distcheck`. A2_TEST_DIR refers to test directory. All output files by unit tests are now created under A2_TEST_OUT_DIR directory.
* 2010-06-22 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-06-221-1/+1
| | | | | | | | | | | | | | | | | | Made test code not use /tmp * test/CookieStorageTest.cc * test/DirectDiskAdaptorTest.cc * test/FallocFileAllocationIteratorTest.cc * test/FileEntryTest.cc * test/FileTest.cc * test/GZipDecoderTest.cc * test/MultiDiskAdaptorTest.cc * test/MultiFileAllocationIteratorTest.cc * test/RequestGroupManTest.cc * test/SignatureTest.cc * test/SingleFileAllocationIteratorTest.cc * test/UtilTest.cc
* 2009-05-04 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2009-05-041-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now the constructor of AbstractDiskWriter takes filename as an argument and filename argument is removed from openFile(), initAndOpenFile(), openExistingFile() interface. storeDir member and its accessor functions are removed from DiskAdaptor because it is not used anymore. size() member function of DefaultDiskWriter, DirectDiskAdaptor and MultiDiskAdaptor now can be called without opening file. * src/AbstractDiskWriter.cc * src/AbstractDiskWriter.h * src/AbstractSingleDiskAdaptor.cc * src/AbstractSingleDiskAdaptor.h * src/ByteArrayDiskWriter.cc * src/ByteArrayDiskWriter.h * src/ByteArrayDiskWriterFactory.cc * src/ByteArrayDiskWriterFactory.h * src/DefaultDiskWriter.cc * src/DefaultDiskWriter.h * src/DefaultDiskWriterFactory.cc * src/DefaultDiskWriterFactory.h * src/DefaultPieceStorage.cc * src/DirectDiskAdaptor.cc * src/DirectDiskAdaptor.h * src/DiskAdaptor.h * src/DiskWriter.h * src/DiskWriterFactory.h * src/MessageDigestHelper.cc * src/MultiDiskAdaptor.cc * src/RequestGroup.cc * src/UnknownLengthPieceStorage.cc * src/Util.cc * test/DefaultDiskWriterTest.cc * test/DirectDiskAdaptorTest.cc * test/FallocFileAllocationIteratorTest.cc * test/MessageDigestHelperTest.cc * test/MetalinkProcessorTest.cc * test/MultiDiskAdaptorTest.cc * test/MultiFileAllocationIteratorTest.cc * test/SingleFileAllocationIteratorTest.cc * test/UtilTest.cc
* 2009-02-13 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2009-02-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | Open file in binary mode. * src/CookieStorage.cc * src/DHTSetup.cc * src/DHTUtil.cc * src/Netrc.cc * src/NsCookieParser.cc * src/ProtocolDetector.cc * src/RequestGroupMan.cc * src/Signature.cc * src/bencode.cc * src/download_helper.cc * src/option_processing.cc * test/CookieParserTest.cc * test/DefaultBtProgressInfoFileTest.cc * test/FileTest.cc * test/GZipDecoderTest.cc * test/RequestGroupManTest.cc * test/SignatureTest.cc * test/SingleFileAllocationIteratorTest.cc * test/UriListParserTest.cc
* 2008-03-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>Tatsuhiro Tsujikawa2008-03-091-2/+2
| | | | | | type cleanup for allmost all remaining files.
* 2008-02-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>Tatsuhiro Tsujikawa2008-02-081-8/+8
| | | | | | | | | Removed "using namespace std;" from all sources. Appended std:: prefix to c++ standard classes. Included string.h where mem* function are used.
* 2007-11-28 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>Tatsuhiro Tsujikawa2007-11-281-24/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added direct I/O support. The current implementation uses O_DIRECT, which is not posix standard and is tested on linux 2.6.21. Currently only file allocation uses direct I/O. * src/SingleFileAllocationIterator.{h, cc} * test/SingleFileAllocationIteratorTest.cc * src/MultiFileAllocationIterator.{h, cc} * test/MultiFileAllocationIteratorTest.cc * src/BinaryStream.h * src/DiskWriter.h * src/AbstractDiskWriter.{h, cc} * src/ByteArrayDiskWriter.h * src/DiskAdaptor.h * src/AbstractSingleDiskAdaptor.{h, cc} * src/MultiDiskAdaptor.{h, cc} * src/FileAllocationEntry.cc * src/Util.{h, cc} * src/OptionHandlerFactory.cc * src/prefs.h * src/version_usage.cc * src/option_processing.cc Moved FileAllocationMan::markCurrentFileAllocationEntryDone() to handleException. * src/MultiFileAllocationIterator.cc Added EINTR handling * src/SocketCore.cc
* 2007-10-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>Tatsuhiro Tsujikawa2007-10-111-0/+68
Implemented BitTorrent/http/ftp integrated download. I've rewritten lots of files and now some headers have forward class declarations to reduce compile time. The implementation is extremely alpha stage, I recommend to use this for testing purpose only.