fixed unit tests

This commit is contained in:
Mikulas Florek 2016-02-18 23:11:45 +01:00
parent 8bf2f88762
commit 6e87b1f1f2
3 changed files with 7 additions and 7 deletions

View file

@ -84,9 +84,9 @@ namespace Lumix
: m_allocator(allocator)
{
copyString(m_base_paths[0], base_path0);
catString(m_base_paths[0], "/");
if (m_base_paths[0][0] != '\0') catString(m_base_paths[0], "/");
copyString(m_base_paths[1], base_path1);
catString(m_base_paths[1], "/");
if (m_base_paths[1][0] != '\0') catString(m_base_paths[1], "/");
}
void DiskFileDevice::destroyFile(IFile* file)

View file

@ -37,7 +37,7 @@ void UT_command_line_parser(const char* params)
LUMIX_EXPECT(parser.next());
LUMIX_EXPECT(parser.currentEquals("\"test\""));
parser.getCurrent(tmp, Lumix::lengthOf(tmp));
LUMIX_EXPECT(Lumix::compareString(tmp, "\"test\"") == 0);
LUMIX_EXPECT(Lumix::compareString(tmp, "test") == 0);
LUMIX_EXPECT(parser.next());
LUMIX_EXPECT(parser.currentEquals("-str2"));
@ -45,7 +45,7 @@ void UT_command_line_parser(const char* params)
LUMIX_EXPECT(parser.next());
LUMIX_EXPECT(parser.currentEquals("\"test with spaces\""));
parser.getCurrent(tmp, Lumix::lengthOf(tmp));
LUMIX_EXPECT(Lumix::compareString(tmp, "\"test with spaces\"") == 0);
LUMIX_EXPECT(Lumix::compareString(tmp, "test with spaces") == 0);
LUMIX_EXPECT(!parser.next());
@ -67,7 +67,7 @@ void UT_command_line_parser(const char* params)
Lumix::CommandLineParser parser6(" \" \" ");
LUMIX_EXPECT(parser6.next());
parser6.getCurrent(tmp, Lumix::lengthOf(tmp));
LUMIX_EXPECT(Lumix::compareString(tmp, "\" \"") == 0);
LUMIX_EXPECT(Lumix::compareString(tmp, " ") == 0);
LUMIX_EXPECT(parser6.currentEquals("\" \""));
LUMIX_EXPECT(!parser6.next());
}

View file

@ -4,8 +4,8 @@
#include "core/crc32.h"
#include "core/string.h"
const char src_path[] = "d:\\Unit\\Test\\PATH_1231231.EXT";
const char res_path[] = "d:/unit/test/path_1231231.ext";
const char src_path[] = "Unit\\Test\\PATH_1231231.EXT";
const char res_path[] = "unit/test/path_1231231.ext";
void UT_path(const char* params)
{