unicode: Fixed tests for Linux
git-svn-id: http://pugixml.googlecode.com/svn/trunk@280 99668b35-9821-0410-8761-19e4c4f06640
This commit is contained in:
parent
dc0a2a815b
commit
516e4d63ce
@ -12,6 +12,13 @@ jmp_buf test_runner::_failure;
|
||||
|
||||
static size_t g_memory_total_size = 0;
|
||||
|
||||
#ifdef __linux
|
||||
size_t _msize(void* ptr)
|
||||
{
|
||||
return malloc_usable_size(ptr);
|
||||
}
|
||||
#endif
|
||||
|
||||
static void* custom_allocate(size_t size)
|
||||
{
|
||||
if (test_runner::_memory_fail_threshold > 0 && test_runner::_memory_fail_threshold < size)
|
||||
|
||||
@ -84,11 +84,15 @@ TEST(document_load_file_error)
|
||||
|
||||
CHECK(doc.load_file("filedoesnotexist").status == status_file_not_found);
|
||||
|
||||
#ifdef __linux
|
||||
CHECK(doc.load_file("/dev/null").status == status_io_error);
|
||||
#else
|
||||
#ifndef __DMC__ // Digital Mars CRT does not like 'con' pseudo-file
|
||||
CHECK(doc.load_file("con").status == status_io_error);
|
||||
#endif
|
||||
|
||||
CHECK(doc.load_file("nul").status == status_io_error);
|
||||
#endif
|
||||
|
||||
test_runner::_memory_fail_threshold = 1;
|
||||
CHECK(doc.load_file("tests/data/small.xml").status == status_out_of_memory);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user