Merge pull request #110 from pzychotic/tests

Small test addition and fix
This commit is contained in:
Lee Thomason 2013-05-11 20:11:55 -07:00
commit f76fe94012
2 changed files with 2 additions and 0 deletions

View File

@ -32,6 +32,7 @@ else(${CMAKE_CURRENT_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_BINARY_DIR})
add_custom_target( add_custom_target(
${TARGET_DATA_COPY} ${TARGET_DATA_COPY}
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/resources/dream.xml ${CMAKE_CURRENT_BINARY_DIR}/resources/ COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/resources/dream.xml ${CMAKE_CURRENT_BINARY_DIR}/resources/
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/resources/empty.xml ${CMAKE_CURRENT_BINARY_DIR}/resources/
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/resources/utf8test.xml ${CMAKE_CURRENT_BINARY_DIR}/resources/ COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/resources/utf8test.xml ${CMAKE_CURRENT_BINARY_DIR}/resources/
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/resources/utf8testverify.xml ${CMAKE_CURRENT_BINARY_DIR}/resources/) COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/resources/utf8testverify.xml ${CMAKE_CURRENT_BINARY_DIR}/resources/)
endif(${CMAKE_CURRENT_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_BINARY_DIR}) endif(${CMAKE_CURRENT_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_BINARY_DIR})

View File

@ -501,6 +501,7 @@ int main( int argc, const char ** argv )
XMLTest( "Query attribute: int as double", result, (int)XML_NO_ERROR ); XMLTest( "Query attribute: int as double", result, (int)XML_NO_ERROR );
XMLTest( "Query attribute: int as double", (int)dVal, 1 ); XMLTest( "Query attribute: int as double", (int)dVal, 1 );
result = ele->QueryDoubleAttribute( "attr1", &dVal ); result = ele->QueryDoubleAttribute( "attr1", &dVal );
XMLTest( "Query attribute: double as double", result, (int)XML_NO_ERROR );
XMLTest( "Query attribute: double as double", (int)dVal, 2 ); XMLTest( "Query attribute: double as double", (int)dVal, 2 );
result = ele->QueryIntAttribute( "attr1", &iVal ); result = ele->QueryIntAttribute( "attr1", &iVal );
XMLTest( "Query attribute: double as int", result, (int)XML_NO_ERROR ); XMLTest( "Query attribute: double as int", result, (int)XML_NO_ERROR );