Add XML tests

Initial conversion of XML tests.

Change-Id: I47256d4d87dad106b04be2c2e1abc9ef070be973
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This commit is contained in:
Leander Beernaert 2019-10-09 16:54:42 +02:00
parent 3a9bca6574
commit f863bf7d64
9 changed files with 111 additions and 1 deletions

View File

@ -39,7 +39,7 @@ if (NOT CMAKE_CROSSCOMPILE AND QT_FEATURE_process)
add_subdirectory(tools)
endif()
if (TARGET Qt::Xml)
# add_subdirectory(xml)
add_subdirectory(xml)
endif()
if (TARGET Qt::Concurrent)
add_subdirectory(concurrent)

View File

@ -0,0 +1,4 @@
# Generated from xml.pro.
add_subdirectory(dom)
add_subdirectory(sax)

View File

@ -0,0 +1,3 @@
# Generated from dom.pro.
add_subdirectory(qdom)

View File

@ -0,0 +1,21 @@
# Generated from qdom.pro.
#####################################################################
## tst_qdom Test:
#####################################################################
# Collect test data
file(GLOB_RECURSE test_data_glob
RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
testdata/*)
list(APPEND test_data ${test_data_glob})
list(APPEND test_data "doubleNamespaces.xml")
list(APPEND test_data "umlaut.xml")
add_qt_test(tst_qdom
SOURCES
tst_qdom.cpp
PUBLIC_LIBRARIES
Qt::Xml
TESTDATA ${test_data}
)

View File

@ -0,0 +1,7 @@
# Generated from sax.pro.
add_subdirectory(qxml)
if(TARGET Qt::Network)
add_subdirectory(qxmlinputsource)
add_subdirectory(qxmlsimplereader)
endif()

View File

@ -0,0 +1,16 @@
# Generated from qxml.pro.
#####################################################################
## tst_qxml Test:
#####################################################################
# Collect test data
list(APPEND test_data "0x010D.xml")
add_qt_test(tst_qxml
SOURCES
tst_qxml.cpp
PUBLIC_LIBRARIES
Qt::Xml
TESTDATA ${test_data}
)

View File

@ -0,0 +1,13 @@
# Generated from qxmlinputsource.pro.
#####################################################################
## tst_qxmlinputsource Test:
#####################################################################
add_qt_test(tst_qxmlinputsource
SOURCES
tst_qxmlinputsource.cpp
PUBLIC_LIBRARIES
Qt::Network
Qt::Xml
)

View File

@ -0,0 +1,27 @@
# Generated from qxmlsimplereader.pro.
#####################################################################
## tst_qxmlsimplereader Test:
#####################################################################
# Collect test data
file(GLOB_RECURSE test_data_glob
RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
encodings/*)
list(APPEND test_data ${test_data_glob})
file(GLOB_RECURSE test_data_glob
RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
xmldocs/*)
list(APPEND test_data ${test_data_glob})
add_qt_test(tst_qxmlsimplereader
SOURCES
parser/parser.cpp parser/parser.h
tst_qxmlsimplereader.cpp
INCLUDE_DIRECTORIES
parser
PUBLIC_LIBRARIES
Qt::Network
Qt::Xml
TESTDATA ${test_data}
)

View File

@ -0,0 +1,19 @@
# special case skip regeneration
cmake_minimum_required(VERSION 3.14.0)
project(Parser CXX)
find_package(Qt6 REQUIRED COMPONENTS Core Gui Xml)
add_executable(parser)
target_sources(parser PRIVATE
main.cpp
parser.cpp
parser.h
)
target_link_libraries(parser PRIVATE
Qt::Gui
Qt::Xml
)