Add XML tests
Initial conversion of XML tests. Change-Id: I47256d4d87dad106b04be2c2e1abc9ef070be973 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This commit is contained in:
parent
3a9bca6574
commit
f863bf7d64
@ -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)
|
||||
|
4
tests/auto/xml/CMakeLists.txt
Normal file
4
tests/auto/xml/CMakeLists.txt
Normal file
@ -0,0 +1,4 @@
|
||||
# Generated from xml.pro.
|
||||
|
||||
add_subdirectory(dom)
|
||||
add_subdirectory(sax)
|
3
tests/auto/xml/dom/CMakeLists.txt
Normal file
3
tests/auto/xml/dom/CMakeLists.txt
Normal file
@ -0,0 +1,3 @@
|
||||
# Generated from dom.pro.
|
||||
|
||||
add_subdirectory(qdom)
|
21
tests/auto/xml/dom/qdom/CMakeLists.txt
Normal file
21
tests/auto/xml/dom/qdom/CMakeLists.txt
Normal 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}
|
||||
)
|
7
tests/auto/xml/sax/CMakeLists.txt
Normal file
7
tests/auto/xml/sax/CMakeLists.txt
Normal file
@ -0,0 +1,7 @@
|
||||
# Generated from sax.pro.
|
||||
|
||||
add_subdirectory(qxml)
|
||||
if(TARGET Qt::Network)
|
||||
add_subdirectory(qxmlinputsource)
|
||||
add_subdirectory(qxmlsimplereader)
|
||||
endif()
|
16
tests/auto/xml/sax/qxml/CMakeLists.txt
Normal file
16
tests/auto/xml/sax/qxml/CMakeLists.txt
Normal 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}
|
||||
)
|
13
tests/auto/xml/sax/qxmlinputsource/CMakeLists.txt
Normal file
13
tests/auto/xml/sax/qxmlinputsource/CMakeLists.txt
Normal 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
|
||||
)
|
27
tests/auto/xml/sax/qxmlsimplereader/CMakeLists.txt
Normal file
27
tests/auto/xml/sax/qxmlsimplereader/CMakeLists.txt
Normal 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}
|
||||
)
|
19
tests/auto/xml/sax/qxmlsimplereader/parser/CMakeLists.txt
Normal file
19
tests/auto/xml/sax/qxmlsimplereader/parser/CMakeLists.txt
Normal 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
|
||||
)
|
Loading…
Reference in New Issue
Block a user