fix some casting
This commit is contained in:
15
xmltest.cpp
15
xmltest.cpp
@@ -998,8 +998,8 @@ int main( int argc, const char ** argv )
|
||||
}
|
||||
// Add API_testcatse :PushDeclaration();PushText();PushComment()
|
||||
{
|
||||
FILE* fp = fopen("resources/out/printer_1.xml","w");
|
||||
XMLPrinter printer(fp);
|
||||
FILE* fp1 = fopen("resources/out/printer_1.xml", "w");
|
||||
XMLPrinter printer(fp1);
|
||||
|
||||
printer.PushDeclaration("version = '1.0' enconding = 'utf-8'");
|
||||
|
||||
@@ -1043,7 +1043,7 @@ int main( int argc, const char ** argv )
|
||||
printer.CloseElement();
|
||||
|
||||
printer.CloseElement();
|
||||
fclose(fp);
|
||||
fclose(fp1);
|
||||
}
|
||||
{
|
||||
XMLDocument doc;
|
||||
@@ -1064,19 +1064,19 @@ int main( int argc, const char ** argv )
|
||||
|
||||
unsigned unsigned_value;
|
||||
unsigned_value = root->FirstChildElement("unsigned")->UnsignedText();
|
||||
XMLTest("PushText( unsigned value ) test",12,unsigned_value);
|
||||
XMLTest("PushText( unsigned value ) test", (unsigned)12, unsigned_value);
|
||||
|
||||
int64_t int64_t_value;
|
||||
int64_t_value = root->FirstChildElement("int64_t")->Int64Text();
|
||||
XMLTest("PushText( int64_t value ) test",13,int64_t_value);
|
||||
XMLTest("PushText( int64_t value ) test", (int64_t) 13, int64_t_value);
|
||||
|
||||
uint64_t uint64_t_value;
|
||||
uint64_t_value = root->FirstChildElement("uint64_t")->Unsigned64Text();
|
||||
XMLTest("PushText( uint64_t value ) test",14,uint64_t_value);
|
||||
XMLTest("PushText( uint64_t value ) test", (uint64_t) 14, uint64_t_value);
|
||||
|
||||
float float_value;
|
||||
float_value = root->FirstChildElement("float")->FloatText();
|
||||
XMLTest("PushText( float value ) test",1.56,float_value);
|
||||
XMLTest("PushText( float value ) test", 1.56f, float_value);
|
||||
|
||||
double double_value;
|
||||
double_value = root->FirstChildElement("double")->DoubleText();
|
||||
@@ -1093,7 +1093,6 @@ int main( int argc, const char ** argv )
|
||||
const XMLDeclaration* declaration = cdoc.FirstChild()->ToDeclaration();
|
||||
const char* declaration_value = declaration->Value();
|
||||
XMLTest("PushDeclaration() test", "version = '1.0' enconding = 'utf-8'", declaration_value);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user