summaryrefslogtreecommitdiff
path: root/tests/test_memory.cpp
diff options
context:
space:
mode:
authorarseny.kapoulkine <arseny.kapoulkine@99668b35-9821-0410-8761-19e4c4f06640>2010-05-06 20:28:36 +0000
committerarseny.kapoulkine <arseny.kapoulkine@99668b35-9821-0410-8761-19e4c4f06640>2010-05-06 20:28:36 +0000
commitf542c5ebb8068ccd4f9176684eb62183afbe7e5c (patch)
tree6121507407cbab62c60047dc32e2332eb02844ca /tests/test_memory.cpp
parentefee7df3f43c01504b4dd7c86f9ec72bcf318f05 (diff)
Integrated changes from unicode branch to trunk
git-svn-id: http://pugixml.googlecode.com/svn/trunk@383 99668b35-9821-0410-8761-19e4c4f06640
Diffstat (limited to 'tests/test_memory.cpp')
-rw-r--r--tests/test_memory.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/tests/test_memory.cpp b/tests/test_memory.cpp
index 8706ed2..7ca87d6 100644
--- a/tests/test_memory.cpp
+++ b/tests/test_memory.cpp
@@ -2,13 +2,13 @@
namespace
{
- char buffer[8];
+ pugi::char_t buffer[8];
int allocate_count = 0;
int deallocate_count = 0;
void* allocate(size_t size)
{
- CHECK(size == 8);
+ CHECK(size == sizeof(pugi::char_t) * 8);
++allocate_count;
return buffer;
}
@@ -32,23 +32,23 @@ TEST(custom_memory_management)
{
// parse document
xml_document doc;
- CHECK(doc.load("<node/>"));
+ CHECK(doc.load(STR("<node />")));
CHECK(allocate_count == 1);
CHECK(deallocate_count == 0);
- CHECK_STRING(buffer, "<node\0>");
+ CHECK_STRING(buffer, STR("<node"));
// modify document
- doc.child("node").set_name("foobars");
+ doc.child(STR("node")).set_name(STR("foobars"));
CHECK(allocate_count == 2);
CHECK(deallocate_count == 0);
- CHECK_STRING(buffer, "foobars");
+ CHECK_STRING(buffer, STR("foobars"));
}
CHECK(allocate_count == 2);
CHECK(deallocate_count == 2);
- CHECK_STRING(buffer, "foobars");
+ CHECK_STRING(buffer, STR("foobars"));
// restore old functions
set_memory_management_functions(old_allocate, old_deallocate);