summaryrefslogtreecommitdiff
path: root/test/TestUtil.cc
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2010-11-20 09:36:14 +0000
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2010-11-20 09:36:14 +0000
commit694fb307aa7e582a55bce7e995bde3a4614b3b4f (patch)
tree42bf3e703ebd706c9ebdd62bca59396f2d67a790 /test/TestUtil.cc
parent580098eb4929a3bdbf424af18da361259ef2efe5 (diff)
2010-11-20 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Replaced StringFormat with fmt
Diffstat (limited to 'test/TestUtil.cc')
-rw-r--r--test/TestUtil.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/test/TestUtil.cc b/test/TestUtil.cc
index 493ac80f..5533555b 100644
--- a/test/TestUtil.cc
+++ b/test/TestUtil.cc
@@ -10,10 +10,10 @@
#include "a2io.h"
#include "File.h"
-#include "StringFormat.h"
#include "FatalException.h"
#include "Cookie.h"
#include "DefaultDiskWriter.h"
+#include "fmt.h"
#ifdef ENABLE_MESSAGE_DIGEST
# include "MessageDigestHelper.h"
#endif // ENABLE_MESSAGE_DIGEST
@@ -25,12 +25,12 @@ void createFile(const std::string& path, size_t length)
File(File(path).getDirname()).mkdirs();
int fd = creat(path.c_str(), OPEN_MODE);
if(fd == -1) {
- throw FATAL_EXCEPTION(StringFormat("Could not create file=%s. cause:%s",
- path.c_str(), strerror(errno)).str());
+ throw FATAL_EXCEPTION(fmt("Could not create file=%s. cause:%s",
+ path.c_str(),
+ strerror(errno)));
}
if(-1 == ftruncate(fd, length)) {
- throw FATAL_EXCEPTION(StringFormat("ftruncate failed. cause:%s",
- strerror(errno)).str());
+ throw FATAL_EXCEPTION(fmt("ftruncate failed. cause:%s", strerror(errno)));
}
close(fd);
}