mirror of
https://github.com/aria2/aria2.git
synced 2025-04-05 13:37:40 +03:00
Made BufferedFile ctor take const char* args
This commit is contained in:
parent
c63af24c63
commit
f133091a9e
18 changed files with 39 additions and 35 deletions
|
@ -24,16 +24,16 @@ void BufferedFileTest::testOpen()
|
|||
{
|
||||
File f(A2_TEST_OUT_DIR"/aria2_BufferedFileTest_testOpen");
|
||||
f.remove();
|
||||
BufferedFile fail(f.getPath(), BufferedFile::READ);
|
||||
BufferedFile fail(f.getPath().c_str(), BufferedFile::READ);
|
||||
CPPUNIT_ASSERT(!fail);
|
||||
|
||||
BufferedFile wr(f.getPath(), BufferedFile::WRITE);
|
||||
BufferedFile wr(f.getPath().c_str(), BufferedFile::WRITE);
|
||||
CPPUNIT_ASSERT(wr);
|
||||
std::string msg = "aria2 rules\nalpha\nbravo\ncharlie";
|
||||
wr.write(msg.data(), msg.size());
|
||||
wr.close();
|
||||
|
||||
BufferedFile rd(f.getPath(), BufferedFile::READ);
|
||||
BufferedFile rd(f.getPath().c_str(), BufferedFile::READ);
|
||||
char buf[256];
|
||||
size_t len = rd.read(buf, 11);
|
||||
CPPUNIT_ASSERT_EQUAL((size_t)11, len);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue