From a743bef220f0b0564358f8efe7afedd9df143767 Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Thu, 25 Aug 2011 00:26:36 +0900 Subject: [PATCH] Fixed output file path of tests. --- test/FallocFileAllocationIteratorTest.cc | 4 +--- test/UtilTest.cc | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/test/FallocFileAllocationIteratorTest.cc b/test/FallocFileAllocationIteratorTest.cc index 07cab4bc..a6b2b8f4 100644 --- a/test/FallocFileAllocationIteratorTest.cc +++ b/test/FallocFileAllocationIteratorTest.cc @@ -29,9 +29,7 @@ void FallocFileAllocationIteratorTest::testAllocate() // When fallocate is used, test fails if file system does not // support it. So skip it. #ifndef HAVE_FALLOCATE - std::string dir = "./"; - std::string fname = "aria2_FallocFileAllocationIteratorTest_testAllocate"; - std::string fn = dir+"/"+fname; + std::string fn = A2_TEST_OUT_DIR"/aria2_FallocFileAllocationIteratorTest_testAllocate"; std::ofstream of(fn.c_str(), std::ios::binary); of << "0123456789"; of.close(); diff --git a/test/UtilTest.cc b/test/UtilTest.cc index 0fd4118f..d11c61fa 100644 --- a/test/UtilTest.cc +++ b/test/UtilTest.cc @@ -649,7 +649,7 @@ void UtilTest::testAlphaToNum() void UtilTest::testMkdirs() { - std::string dir = "./aria2-UtilTest-testMkdirs"; + std::string dir = A2_TEST_OUT_DIR"/aria2-UtilTest-testMkdirs"; File d(dir); if(d.exists()) { CPPUNIT_ASSERT(d.remove());