Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -128,3 +128,14 @@ install(
DESTINATION "${tinyxml2_INSTALL_PKGCONFIGDIR}"
COMPONENT tinyxml2_development
)

if (QNX)
install(
TARGETS xmltest
DESTINATION bin/tinyxml2_tests
)
install(
DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/resources
DESTINATION bin/tinyxml2_tests
)
endif ()
2 changes: 1 addition & 1 deletion tinyxml2.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ distribution.
#ifndef TINYXML2_INCLUDED
#define TINYXML2_INCLUDED

#if defined(ANDROID_NDK) || defined(__BORLANDC__) || defined(__QNXNTO__)
#if defined(ANDROID_NDK) || defined(__BORLANDC__) || defined(__QNX__)
# include <ctype.h>
# include <limits.h>
# include <stdio.h>
Expand Down
9 changes: 8 additions & 1 deletion xmltest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,14 @@ bool XMLTest (const char* testString, const char* expected, const char* found, b
printf( "%s\n", found );
}
else {
#ifndef __QNX__
// In QNX, null pointers cannot be printed as "(null)"
const char* expected_qnx = expected == NULL ? "(null)" : expected;
const char* found_qnx = found == NULL ? "(null)" : expected;
printf (" %s [%s][%s]\n", testString, expected_qnx, found_qnx);
#else
printf (" %s [%s][%s]\n", testString, expected, found);
#endif
}
}

Expand Down Expand Up @@ -2321,7 +2328,7 @@ int main( int argc, const char ** argv )
XMLTest( "Should be no error initially", false, doc.Error() );
doc.LoadFile( "resources/no-such-file.xml" );
XMLTest( "No such file - should fail", true, doc.Error() );

doc.LoadFile("resources/dream.xml");
XMLTest("Error should be cleared", false, doc.Error());

Expand Down