#include <dpl/test/test_runner.h>
#include <dpl/scoped_dir.h>
-#include <dpl/scoped_free.h>
#include <dpl/utils/path.h>
#include <dpl/foreach.h>
-#include <dpl/log/log.h>
+#include <dpl/log/wrt_log.h>
#include <dpl/binary_queue.h>
#include <dpl/file_input.h>
#include <dpl/file_output.h>
*/
RUNNER_TEST(path_construction_1)
{
- DPL::ScopedFree<char> sf(getcwd(NULL, 0));
+ std::unique_ptr<char> sf(getcwd(NULL, 0));
Path path1(std::string("/test/bin/file"));
RUNNER_ASSERT(path1.Fullpath() == "/test/bin/file");
*/
RUNNER_TEST(path_construction_2)
{
- DPL::ScopedFree<char> sf(getcwd(NULL, 0));
- std::string cwd(sf.Get());
+ std::unique_ptr<char> sf(getcwd(NULL, 0));
+ std::string cwd(sf.get());
if("/" == cwd)
cwd = "";
*/
RUNNER_TEST(path_construction_3)
{
- DPL::ScopedFree<char> sf(getcwd(NULL, 0));
- std::string cwd(sf.Get());
+ std::unique_ptr<char> sf(getcwd(NULL, 0));
+ std::string cwd(sf.get());
if("/" == cwd)
cwd = "";
*/
RUNNER_TEST(path_construction_4)
{
- DPL::ScopedFree<char> sf(getcwd(NULL, 0));
+ std::unique_ptr<char> sf(getcwd(NULL, 0));
Path path4("/test/bin/abc");
RUNNER_ASSERT(path4.Fullpath() == "/test/bin/abc");
*/
RUNNER_TEST(path_construction_5)
{
- DPL::ScopedFree<char> sf(getcwd(NULL, 0));
- std::string cwd(sf.Get());
+ std::unique_ptr<char> sf(getcwd(NULL, 0));
+ std::string cwd(sf.get());
if("/" == cwd)
cwd = "";
*/
RUNNER_TEST(path_construction_6)
{
- DPL::ScopedFree<char> sf(getcwd(NULL, 0));
+ std::unique_ptr<char> sf(getcwd(NULL, 0));
Path path6(DPL::String(L"/test/bin/file"));
RUNNER_ASSERT(path6.Fullpath() == "/test/bin/file");
*/
RUNNER_TEST(path_construction_7)
{
- DPL::ScopedFree<char> sf(getcwd(NULL, 0));
- std::string cwd(sf.Get());
+ std::unique_ptr<char> sf(getcwd(NULL, 0));
+ std::string cwd(sf.get());
if("/" == cwd)
cwd = "";
*/
RUNNER_TEST(path_construction_8)
{
- DPL::ScopedFree<char> sf(getcwd(NULL, 0));
+ std::unique_ptr<char> sf(getcwd(NULL, 0));
Path path8 = Path("/test/bin/") / "123" / "dir1.dll";
RUNNER_ASSERT(path8.Fullpath() == "/test/bin/123/dir1.dll");
*/
RUNNER_TEST(path_construction_9)
{
- DPL::ScopedFree<char> sf(getcwd(NULL, 0));
+ std::unique_ptr<char> sf(getcwd(NULL, 0));
Path path9 = Path("/test/bin/file.txt//");
RUNNER_ASSERT(path9.Fullpath() == "/test/bin/file.txt");
FOREACH(file, dirTest)
{
passed = false;
- LogError("Directory should be empty");
+ WrtLogE("Directory should be empty");
}
}
Catch(Path::NotDirectory)
{
passed = false;
- LogError("Directory should exists");
+ WrtLogE("Directory should exists");
}
RUNNER_ASSERT(passed);
}