summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/test.cpp2
-rw-r--r--tests/test.hpp2
-rw-r--r--tests/test_document.cpp18
-rw-r--r--tests/writer_string.cpp10
-rw-r--r--tests/writer_string.hpp10
5 files changed, 21 insertions, 21 deletions
diff --git a/tests/test.cpp b/tests/test.cpp
index 247c714..862a0ea 100644
--- a/tests/test.cpp
+++ b/tests/test.cpp
@@ -171,7 +171,7 @@ bool is_little_endian()
return *reinterpret_cast<char*>(&ui) == 1;
}
-pugi::encoding_t get_native_encoding()
+pugi::xml_encoding get_native_encoding()
{
#ifdef PUGIXML_WCHAR_MODE
return pugi::encoding_wchar;
diff --git a/tests/test.hpp b/tests/test.hpp
index e99eb57..d4b5879 100644
--- a/tests/test.hpp
+++ b/tests/test.hpp
@@ -146,6 +146,6 @@ inline wchar_t wchar_cast(unsigned int value)
}
bool is_little_endian();
-pugi::encoding_t get_native_encoding();
+pugi::xml_encoding get_native_encoding();
#endif
diff --git a/tests/test_document.cpp b/tests/test_document.cpp
index 11be6da..c40c14a 100644
--- a/tests/test_document.cpp
+++ b/tests/test_document.cpp
@@ -394,7 +394,7 @@ TEST(document_load_file_convert_auto)
"tests/data/utftest_utf8_nodecl.xml"
};
- encoding_t encodings[] =
+ xml_encoding encodings[] =
{
encoding_utf16_be, encoding_utf16_be, encoding_utf16_be,
encoding_utf16_le, encoding_utf16_le, encoding_utf16_le,
@@ -435,7 +435,7 @@ TEST(document_load_file_convert_specific)
"tests/data/utftest_utf8_nodecl.xml"
};
- encoding_t encodings[] =
+ xml_encoding encodings[] =
{
encoding_utf16_be, encoding_utf16_be, encoding_utf16_be,
encoding_utf16_le, encoding_utf16_le, encoding_utf16_le,
@@ -448,7 +448,7 @@ TEST(document_load_file_convert_specific)
{
for (unsigned int j = 0; j < sizeof(files) / sizeof(files[0]); ++j)
{
- encoding_t encoding = encodings[j];
+ xml_encoding encoding = encodings[j];
xml_document doc;
xml_parse_result res = doc.load_file(files[i], parse_default, encoding);
@@ -490,7 +490,7 @@ TEST(document_load_file_convert_native_endianness)
}
};
- encoding_t encodings[] =
+ xml_encoding encodings[] =
{
encoding_utf16, encoding_utf16, encoding_utf16,
encoding_utf32, encoding_utf32, encoding_utf32
@@ -503,7 +503,7 @@ TEST(document_load_file_convert_native_endianness)
for (unsigned int j = 0; j < sizeof(encodings) / sizeof(encodings[0]); ++j)
{
- encoding_t encoding = encodings[j];
+ xml_encoding encoding = encodings[j];
// check file with right endianness
{
@@ -554,7 +554,7 @@ TEST(document_contents_preserve)
struct file_t
{
const char* path;
- encoding_t encoding;
+ xml_encoding encoding;
char* data;
size_t size;
@@ -596,7 +596,7 @@ TEST(document_contents_preserve)
}
}
-static bool test_parse_fail(const void* buffer, size_t size, encoding_t encoding = encoding_utf8)
+static bool test_parse_fail(const void* buffer, size_t size, xml_encoding encoding = encoding_utf8)
{
// copy buffer to heap (to enable out-of-bounds checks)
void* temp = malloc(size);
@@ -646,7 +646,7 @@ TEST(document_convert_invalid_utf16)
TEST(document_load_buffer_empty)
{
- encoding_t encodings[] =
+ xml_encoding encodings[] =
{
encoding_auto,
encoding_utf8,
@@ -663,7 +663,7 @@ TEST(document_load_buffer_empty)
for (unsigned int i = 0; i < sizeof(encodings) / sizeof(encodings[0]); ++i)
{
- encoding_t encoding = encodings[i];
+ xml_encoding encoding = encodings[i];
xml_document doc;
CHECK(doc.load_buffer(buffer, 0, parse_default, encoding) && !doc.first_child());
diff --git a/tests/writer_string.cpp b/tests/writer_string.cpp
index b2c089f..878a103 100644
--- a/tests/writer_string.cpp
+++ b/tests/writer_string.cpp
@@ -39,7 +39,7 @@ std::basic_string<pugi::char_t> xml_writer_string::as_string() const
return std::basic_string<pugi::char_t>(reinterpret_cast<const pugi::char_t*>(contents.data()), contents.size() / sizeof(pugi::char_t));
}
-std::string save_narrow(const pugi::xml_document& doc, unsigned int flags, pugi::encoding_t encoding)
+std::string save_narrow(const pugi::xml_document& doc, unsigned int flags, pugi::xml_encoding encoding)
{
xml_writer_string writer;
@@ -48,12 +48,12 @@ std::string save_narrow(const pugi::xml_document& doc, unsigned int flags, pugi:
return writer.as_narrow();
}
-bool test_save_narrow(const pugi::xml_document& doc, unsigned int flags, pugi::encoding_t encoding, const char* expected, size_t length)
+bool test_save_narrow(const pugi::xml_document& doc, unsigned int flags, pugi::xml_encoding encoding, const char* expected, size_t length)
{
return test_narrow(save_narrow(doc, flags, encoding), expected, length);
}
-std::string write_narrow(pugi::xml_node node, unsigned int flags, pugi::encoding_t encoding)
+std::string write_narrow(pugi::xml_node node, unsigned int flags, pugi::xml_encoding encoding)
{
xml_writer_string writer;
@@ -62,12 +62,12 @@ std::string write_narrow(pugi::xml_node node, unsigned int flags, pugi::encoding
return writer.as_narrow();
}
-bool test_write_narrow(pugi::xml_node node, unsigned int flags, pugi::encoding_t encoding, const char* expected, size_t length)
+bool test_write_narrow(pugi::xml_node node, unsigned int flags, pugi::xml_encoding encoding, const char* expected, size_t length)
{
return test_narrow(write_narrow(node, flags, encoding), expected, length);
}
-std::wstring write_wide(pugi::xml_node node, unsigned int flags, pugi::encoding_t encoding)
+std::wstring write_wide(pugi::xml_node node, unsigned int flags, pugi::xml_encoding encoding)
{
xml_writer_string writer;
diff --git a/tests/writer_string.hpp b/tests/writer_string.hpp
index a862922..acf6318 100644
--- a/tests/writer_string.hpp
+++ b/tests/writer_string.hpp
@@ -16,12 +16,12 @@ struct xml_writer_string: public pugi::xml_writer
std::basic_string<pugi::char_t> as_string() const;
};
-std::string save_narrow(const pugi::xml_document& doc, unsigned int flags, pugi::encoding_t encoding);
-bool test_save_narrow(const pugi::xml_document& doc, unsigned int flags, pugi::encoding_t encoding, const char* expected, size_t length);
+std::string save_narrow(const pugi::xml_document& doc, unsigned int flags, pugi::xml_encoding encoding);
+bool test_save_narrow(const pugi::xml_document& doc, unsigned int flags, pugi::xml_encoding encoding, const char* expected, size_t length);
-std::string write_narrow(pugi::xml_node node, unsigned int flags, pugi::encoding_t encoding);
-bool test_write_narrow(pugi::xml_node node, unsigned int flags, pugi::encoding_t encoding, const char* expected, size_t length);
+std::string write_narrow(pugi::xml_node node, unsigned int flags, pugi::xml_encoding encoding);
+bool test_write_narrow(pugi::xml_node node, unsigned int flags, pugi::xml_encoding encoding, const char* expected, size_t length);
-std::wstring write_wide(pugi::xml_node node, unsigned int flags, pugi::encoding_t encoding);
+std::wstring write_wide(pugi::xml_node node, unsigned int flags, pugi::xml_encoding encoding);
#endif