* @version 1.0
* @brief This file is the implementation file of zip input tests
*/
+#include <memory>
#include <dpl/test/test_runner.h>
#include <dpl/zip_input.h>
#include <dpl/foreach.h>
#include <dpl/abstract_waitable_input_adapter.h>
#include <dpl/abstract_waitable_output_adapter.h>
#include <dpl/binary_queue.h>
-#include <dpl/scoped_array.h>
#include <dpl/copy.h>
-#include <dpl/log/log.h>
+#include <dpl/log/wrt_log.h>
namespace {
const char* PATH_NO_FILE = "/opt/share/wrt/wrt-commons/tests/core/no_such_file";
FOREACH(iter, zip)
{
- LogDebug("---------");
- LogDebug("FileInfo: ");
-#define FIELD(X) LogDebug(#X ": " << iter->X)
- FIELD(name);
- FIELD(comment);
- FIELD(compressedSize);
- FIELD(uncompressedSize);
-#undef FIELD
+ WrtLogD("---------");
+ WrtLogD("FileInfo: ");
+ WrtLogD("name: %s", iter->name.c_str());
+ WrtLogD("comment: %s", iter->comment.c_str());
+ WrtLogD("compressedSize: %lli", iter->compressedSize);
+ WrtLogD("uncompressedSize: %lli", iter->uncompressedSize);
}
}
DPL::Copy(&fileAdapter, &bufferAdapter);
- DPL::ScopedArray<char> data(new char[buffer.Size() + 1]);
- buffer.Flatten(data.Get(), buffer.Size());
+ std::unique_ptr<char[]> data(new char[buffer.Size() + 1]);
+ buffer.Flatten(data.get(), buffer.Size());
data[buffer.Size()] = '\0';
- RUNNER_ASSERT(std::string(data.Get()) == "test");
+ RUNNER_ASSERT(std::string(data.get()) == "test");
}