summaryrefslogtreecommitdiff
path: root/tests/test_document.cpp
diff options
context:
space:
mode:
authorarseny.kapoulkine <arseny.kapoulkine@99668b35-9821-0410-8761-19e4c4f06640>2010-12-19 10:16:37 +0000
committerarseny.kapoulkine <arseny.kapoulkine@99668b35-9821-0410-8761-19e4c4f06640>2010-12-19 10:16:37 +0000
commitd99745be21ad9affc7e127944556c74da07440c4 (patch)
treeb892303531af3f3775aeaa01799f2cb691a6d0f4 /tests/test_document.cpp
parent5720761685a1abc8ae0b5840a62359d35838ac3b (diff)
Enabled many additional GCC warnings (most notably -Wshadow and -Wold-style-cast), fixed the code accordingly
git-svn-id: http://pugixml.googlecode.com/svn/trunk@800 99668b35-9821-0410-8761-19e4c4f06640
Diffstat (limited to 'tests/test_document.cpp')
-rw-r--r--tests/test_document.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/test_document.cpp b/tests/test_document.cpp
index 971bb48..11057ae 100644
--- a/tests/test_document.cpp
+++ b/tests/test_document.cpp
@@ -429,7 +429,7 @@ TEST(document_parse_result_bool)
for (int i = 1; i < 20; ++i)
{
- result.status = (xml_parse_status)i;
+ result.status = static_cast<xml_parse_status>(i);
CHECK(!result);
CHECK(result == false);
}
@@ -441,7 +441,7 @@ TEST(document_parse_result_description)
for (int i = 0; i < 20; ++i)
{
- result.status = (xml_parse_status)i;
+ result.status = static_cast<xml_parse_status>(i);
CHECK(result.description() != 0);
CHECK(result.description()[0] != 0);
@@ -461,7 +461,7 @@ inline void check_utftest_document(const xml_document& doc)
CHECK_STRING(doc.last_child().first_child().name(), STR("English"));
// check that we have parsed some non-ascii text
- CHECK((unsigned)doc.last_child().last_child().name()[0] >= 0x80);
+ CHECK(static_cast<unsigned int>(doc.last_child().last_child().name()[0]) >= 0x80);
// check magic string
const pugi::char_t* v = doc.last_child().child(STR("Heavy")).previous_sibling().child_value();
@@ -645,7 +645,7 @@ static bool load_file_in_memory(const char* path, char*& data, size_t& size)
if (!file) return false;
fseek(file, 0, SEEK_END);
- size = (size_t)ftell(file);
+ size = static_cast<size_t>(ftell(file));
fseek(file, 0, SEEK_SET);
data = new char[size];