react-native-nitro-xlsx 0.2.5 → 0.2.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/NitroXlsx.podspec +26 -27
- package/Package.swift +31 -10
- package/README.md +1 -1
- package/android/CMakeLists.txt +20 -27
- package/package.json +2 -2
- package/scripts/run-cpp-tests.sh +1 -1
- package/thirdparty/OpenXLSX/.clang-format +118 -0
- package/thirdparty/OpenXLSX/.clang-tidy +28 -0
- package/thirdparty/OpenXLSX/.gitignore +130 -0
- package/thirdparty/OpenXLSX/Benchmarks/2024-07-29-benchmarks_before_XMLNode_wrappers +46 -0
- package/thirdparty/OpenXLSX/Benchmarks/2024-07-29-benchmarks_with_XMLNode_wrappers_and_namespace_and_stripping +49 -0
- package/thirdparty/OpenXLSX/Benchmarks/2024-07-29-benchmarks_with_XMLNode_wrappers_and_namespace_char_support +49 -0
- package/thirdparty/OpenXLSX/Benchmarks/2024-07-29-benchmarks_with_XMLNode_wrappers_and_namespace_support +49 -0
- package/thirdparty/OpenXLSX/Benchmarks/2024-07-29-benchmarks_with_XMLNode_wrappers_and_namespaced_name_disabled +49 -0
- package/thirdparty/OpenXLSX/Benchmarks/2024-08-11-benchmarks_post-XLCellIterator-Rework +46 -0
- package/thirdparty/OpenXLSX/Benchmarks/2024-08-14-benchmarks_post-default-row-column-style-support +46 -0
- package/thirdparty/OpenXLSX/Benchmarks/2024-09-02-benchmarks +46 -0
- package/thirdparty/OpenXLSX/Benchmarks/2024-12-19-benchmarks +46 -0
- package/thirdparty/OpenXLSX/Benchmarks/2024-12-30-benchmarks-post-XLSharedStrings-by-ref +46 -0
- package/thirdparty/OpenXLSX/Benchmarks/2025-01-09-benchmarks-post-conditionalFormatsAndSheetProtection +46 -0
- package/thirdparty/OpenXLSX/Benchmarks/2025-01-10-benchmarks-post-XLCellValue-bugfix +46 -0
- package/thirdparty/OpenXLSX/Benchmarks/2025-01-31-benchmarks-post-XLComments-implementation +46 -0
- package/thirdparty/OpenXLSX/Benchmarks/2025-02-02-benchmarks-post-XLRowIterator-Rework +46 -0
- package/thirdparty/OpenXLSX/Benchmarks/2025-07-20-benchmarks-after-hiding-pugixml-internals +46 -0
- package/thirdparty/OpenXLSX/Benchmarks/2025-08-29-benchmarks-after-code-review-with-libzip +46 -0
- package/thirdparty/OpenXLSX/Benchmarks/Benchmark.cpp +249 -0
- package/thirdparty/OpenXLSX/Benchmarks/CMakeLists.txt +19 -0
- package/thirdparty/OpenXLSX/CMakeLists.txt +466 -0
- package/thirdparty/OpenXLSX/Documentation/CMakeLists.txt +31 -0
- package/thirdparty/OpenXLSX/Documentation/Doxyfile.in +2471 -0
- package/thirdparty/OpenXLSX/Documentation/DoxygenLayout.xml +194 -0
- package/thirdparty/OpenXLSX/Documentation/customdoxygen.css +1355 -0
- package/thirdparty/OpenXLSX/Examples/CMakeLists.txt +103 -0
- package/thirdparty/OpenXLSX/Examples/Demo1.cpp +279 -0
- package/thirdparty/OpenXLSX/Examples/Demo10.cpp +545 -0
- package/thirdparty/OpenXLSX/Examples/Demo1A.cpp +137 -0
- package/thirdparty/OpenXLSX/Examples/Demo2.cpp +65 -0
- package/thirdparty/OpenXLSX/Examples/Demo3.cpp +89 -0
- package/thirdparty/OpenXLSX/Examples/Demo4.cpp +86 -0
- package/thirdparty/OpenXLSX/Examples/Demo5.cpp +77 -0
- package/thirdparty/OpenXLSX/Examples/Demo6.cpp +103 -0
- package/thirdparty/OpenXLSX/Examples/Demo7.cpp +79 -0
- package/thirdparty/OpenXLSX/Examples/Demo8.cpp +117 -0
- package/thirdparty/OpenXLSX/Examples/Demo9.cpp +363 -0
- package/thirdparty/OpenXLSX/Examples/cmake/FindLIBZIP.cmake +61 -0
- package/thirdparty/OpenXLSX/Examples/external/CustomZip/CustomZip.hpp +256 -0
- package/thirdparty/OpenXLSX/LICENSE.md +29 -0
- package/thirdparty/OpenXLSX/Makefile.GNU +530 -0
- package/thirdparty/OpenXLSX/Notes/TBDs.txt +16 -0
- package/thirdparty/OpenXLSX/Notes/confirmed-TBCs.txt +8 -0
- package/thirdparty/OpenXLSX/Notes/styles-missing-support.xml +12 -0
- package/thirdparty/OpenXLSX/Notes/todo-list.txt +108 -0
- package/thirdparty/OpenXLSX/OpenXLSX/CMakeLists.txt +631 -0
- package/thirdparty/OpenXLSX/OpenXLSX/OpenXLSX.hpp +63 -0
- package/thirdparty/OpenXLSX/OpenXLSX/OpenXLSXConfig.cmake +11 -0
- package/thirdparty/OpenXLSX/OpenXLSX/cmake/bundle_static_library.cmake +198 -0
- package/thirdparty/OpenXLSX/OpenXLSX/cmake/patch_pkg_config.cmake +69 -0
- package/thirdparty/OpenXLSX/OpenXLSX/headers/IZipArchive.hpp +361 -0
- package/thirdparty/OpenXLSX/OpenXLSX/headers/OpenXLSX-Exports.hpp +12 -0
- package/thirdparty/OpenXLSX/OpenXLSX/headers/XLCell.hpp +367 -0
- package/thirdparty/OpenXLSX/OpenXLSX/headers/XLCellIterator.hpp +252 -0
- package/thirdparty/OpenXLSX/OpenXLSX/headers/XLCellRange.hpp +223 -0
- package/thirdparty/OpenXLSX/OpenXLSX/headers/XLCellReference.hpp +317 -0
- package/thirdparty/OpenXLSX/OpenXLSX/headers/XLCellValue.hpp +793 -0
- package/thirdparty/OpenXLSX/OpenXLSX/headers/XLColor.hpp +232 -0
- package/thirdparty/OpenXLSX/OpenXLSX/headers/XLColumn.hpp +159 -0
- package/thirdparty/OpenXLSX/OpenXLSX/headers/XLCommandQuery.hpp +228 -0
- package/thirdparty/OpenXLSX/OpenXLSX/headers/XLComments.hpp +270 -0
- package/thirdparty/OpenXLSX/OpenXLSX/headers/XLConstants.hpp +18 -0
- package/thirdparty/OpenXLSX/OpenXLSX/headers/XLContentTypes.hpp +264 -0
- package/thirdparty/OpenXLSX/OpenXLSX/headers/XLDateTime.hpp +175 -0
- package/thirdparty/OpenXLSX/OpenXLSX/headers/XLDocument.hpp +505 -0
- package/thirdparty/OpenXLSX/OpenXLSX/headers/XLDrawing.hpp +452 -0
- package/thirdparty/OpenXLSX/OpenXLSX/headers/XLException.hpp +161 -0
- package/thirdparty/OpenXLSX/OpenXLSX/headers/XLFormula.hpp +375 -0
- package/thirdparty/OpenXLSX/OpenXLSX/headers/XLIterator.hpp +40 -0
- package/thirdparty/OpenXLSX/OpenXLSX/headers/XLMergeCells.hpp +216 -0
- package/thirdparty/OpenXLSX/OpenXLSX/headers/XLProperties.hpp +348 -0
- package/thirdparty/OpenXLSX/OpenXLSX/headers/XLRelationships.hpp +348 -0
- package/thirdparty/OpenXLSX/OpenXLSX/headers/XLRow.hpp +721 -0
- package/thirdparty/OpenXLSX/OpenXLSX/headers/XLRowData.hpp +488 -0
- package/thirdparty/OpenXLSX/OpenXLSX/headers/XLSharedStrings.hpp +204 -0
- package/thirdparty/OpenXLSX/OpenXLSX/headers/XLSheet.hpp +1640 -0
- package/thirdparty/OpenXLSX/OpenXLSX/headers/XLStyles.hpp +2390 -0
- package/thirdparty/OpenXLSX/OpenXLSX/headers/XLTables.hpp +132 -0
- package/thirdparty/OpenXLSX/OpenXLSX/headers/XLWorkbook.hpp +404 -0
- package/thirdparty/OpenXLSX/OpenXLSX/headers/XLXmlData.hpp +283 -0
- package/thirdparty/OpenXLSX/OpenXLSX/headers/XLXmlFile.hpp +194 -0
- package/thirdparty/OpenXLSX/OpenXLSX/headers/XLXmlParser.hpp +282 -0
- package/thirdparty/OpenXLSX/OpenXLSX/headers/XLXmlParserForwardDeclarations.hpp +85 -0
- package/thirdparty/OpenXLSX/OpenXLSX/headers/XLZipArchive.hpp +232 -0
- package/thirdparty/OpenXLSX/OpenXLSX/headers/detail/LibZip.hpp +447 -0
- package/thirdparty/OpenXLSX/OpenXLSX/headers/detail/OpenXLSXFileSystemTools.hpp +207 -0
- package/thirdparty/OpenXLSX/OpenXLSX/headers/detail/Zippy.hpp +1375 -0
- package/thirdparty/OpenXLSX/OpenXLSX/sources/XLCell.cpp +340 -0
- package/thirdparty/OpenXLSX/OpenXLSX/sources/XLCellIterator.cpp +427 -0
- package/thirdparty/OpenXLSX/OpenXLSX/sources/XLCellRange.cpp +221 -0
- package/thirdparty/OpenXLSX/OpenXLSX/sources/XLCellReference.cpp +408 -0
- package/thirdparty/OpenXLSX/OpenXLSX/sources/XLCellValue.cpp +519 -0
- package/thirdparty/OpenXLSX/OpenXLSX/sources/XLColor.cpp +202 -0
- package/thirdparty/OpenXLSX/OpenXLSX/sources/XLColumn.cpp +141 -0
- package/thirdparty/OpenXLSX/OpenXLSX/sources/XLComments.cpp +637 -0
- package/thirdparty/OpenXLSX/OpenXLSX/sources/XLContentTypes.cpp +329 -0
- package/thirdparty/OpenXLSX/OpenXLSX/sources/XLDateTime.cpp +269 -0
- package/thirdparty/OpenXLSX/OpenXLSX/sources/XLDocument.cpp +1678 -0
- package/thirdparty/OpenXLSX/OpenXLSX/sources/XLDrawing.cpp +784 -0
- package/thirdparty/OpenXLSX/OpenXLSX/sources/XLFormula.cpp +201 -0
- package/thirdparty/OpenXLSX/OpenXLSX/sources/XLMergeCells.cpp +357 -0
- package/thirdparty/OpenXLSX/OpenXLSX/sources/XLProperties.cpp +810 -0
- package/thirdparty/OpenXLSX/OpenXLSX/sources/XLRelationships.cpp +529 -0
- package/thirdparty/OpenXLSX/OpenXLSX/sources/XLRow.cpp +918 -0
- package/thirdparty/OpenXLSX/OpenXLSX/sources/XLRowData.cpp +508 -0
- package/thirdparty/OpenXLSX/OpenXLSX/sources/XLSharedStrings.cpp +220 -0
- package/thirdparty/OpenXLSX/OpenXLSX/sources/XLSheet.cpp +1970 -0
- package/thirdparty/OpenXLSX/OpenXLSX/sources/XLStyles.cpp +3014 -0
- package/thirdparty/OpenXLSX/OpenXLSX/sources/XLTables.cpp +125 -0
- package/thirdparty/OpenXLSX/OpenXLSX/sources/XLWorkbook.cpp +784 -0
- package/thirdparty/OpenXLSX/OpenXLSX/sources/XLXmlData.cpp +247 -0
- package/thirdparty/OpenXLSX/OpenXLSX/sources/XLXmlFile.cpp +160 -0
- package/thirdparty/OpenXLSX/OpenXLSX/sources/XLXmlParser.cpp +261 -0
- package/thirdparty/OpenXLSX/OpenXLSX/sources/XLZipArchive.cpp +266 -0
- package/thirdparty/OpenXLSX/OpenXLSX/sources/utilities/XLUtilities.hpp +478 -0
- package/thirdparty/OpenXLSX/README.md +1279 -0
- package/thirdparty/OpenXLSX/Scripts/cmake-cleanup.sh +102 -0
- package/thirdparty/OpenXLSX/Scripts/compile.sh +23 -0
- package/thirdparty/OpenXLSX/Scripts/demos-cleanup.sh +25 -0
- package/thirdparty/OpenXLSX/Scripts/demos-run-all.sh +60 -0
- package/thirdparty/OpenXLSX/Scripts/guarded-xml-format.sh +47 -0
- package/thirdparty/OpenXLSX/Scripts/make-gnu.sh +11 -0
- package/thirdparty/OpenXLSX/Scripts/uninstall-manifest.sh +48 -0
- package/thirdparty/OpenXLSX/Scripts/xml-format-all.sh +19 -0
- package/thirdparty/OpenXLSX/Scripts/xml-format.sh +38 -0
- package/thirdparty/OpenXLSX/Tests/CMakeLists.txt +37 -0
- package/thirdparty/OpenXLSX/Tests/catch/catch.hpp +17799 -0
- package/thirdparty/OpenXLSX/Tests/catch/catch_reporter_automake.hpp +68 -0
- package/thirdparty/OpenXLSX/Tests/catch/catch_reporter_sonarqube.hpp +182 -0
- package/thirdparty/OpenXLSX/Tests/catch/catch_reporter_tap.hpp +278 -0
- package/thirdparty/OpenXLSX/Tests/catch/catch_reporter_teamcity.hpp +212 -0
- package/thirdparty/OpenXLSX/Tests/main.cpp +55 -0
- package/thirdparty/OpenXLSX/Tests/testXLCell.cpp +176 -0
- package/thirdparty/OpenXLSX/Tests/testXLCellRange.cpp +180 -0
- package/thirdparty/OpenXLSX/Tests/testXLCellReference.cpp +160 -0
- package/thirdparty/OpenXLSX/Tests/testXLCellValue.cpp +366 -0
- package/thirdparty/OpenXLSX/Tests/testXLCellValueProxy.cpp +255 -0
- package/thirdparty/OpenXLSX/Tests/testXLColor.cpp +75 -0
- package/thirdparty/OpenXLSX/Tests/testXLDateTime.cpp +229 -0
- package/thirdparty/OpenXLSX/Tests/testXLDocument.cpp +197 -0
- package/thirdparty/OpenXLSX/Tests/testXLFormula.cpp +131 -0
- package/thirdparty/OpenXLSX/Tests/testXLRow.cpp +597 -0
- package/thirdparty/OpenXLSX/Tests/testXLSheet.cpp +77 -0
- package/thirdparty/OpenXLSX/Tests/ziptest-with-libs.cpp +88 -0
- package/thirdparty/OpenXLSX/Tests/ziptest.cpp +735 -0
- package/thirdparty/OpenXLSX/cmake/get-git-HEAD-ID.cmake +45 -0
- package/thirdparty/OpenXLSX/cmake/libopenxlsxCPackOptions.cmake.in +20 -0
- package/thirdparty/OpenXLSX/cmake/manage_dependency.cmake +813 -0
- package/thirdparty/OpenXLSX/cmake/recursive_library_type_test.cmake +52 -0
- package/thirdparty/OpenXLSX/gnu-make-crutch/OpenXLSX-Exports-shared.hpp +42 -0
- package/thirdparty/OpenXLSX/gnu-make-crutch/OpenXLSX-Exports-static.hpp +42 -0
- package/thirdparty/OpenXLSX/vcpkg.json +24 -0
- package/thirdparty/README.md +42 -0
- package/thirdparty/miniz/.clang-format +47 -0
- package/thirdparty/miniz/.travis.yml +2 -0
- package/thirdparty/miniz/CMakeLists.txt +333 -0
- package/thirdparty/miniz/CMakePresets.json +31 -0
- package/thirdparty/miniz/ChangeLog.md +272 -0
- package/thirdparty/miniz/Config.cmake.in +1 -0
- package/thirdparty/miniz/LICENSE +22 -0
- package/thirdparty/miniz/amalgamate.sh +57 -0
- package/thirdparty/miniz/examples/example1.c +105 -0
- package/thirdparty/miniz/examples/example2.c +164 -0
- package/thirdparty/miniz/examples/example3.c +269 -0
- package/thirdparty/miniz/examples/example4.c +102 -0
- package/thirdparty/miniz/examples/example5.c +327 -0
- package/thirdparty/miniz/examples/example6.c +189 -0
- package/thirdparty/miniz/meson.build +21 -0
- package/thirdparty/miniz/miniz.c +646 -0
- package/thirdparty/miniz/miniz.h +615 -0
- package/thirdparty/miniz/miniz.pc.in +13 -0
- package/thirdparty/miniz/miniz_common.h +89 -0
- package/thirdparty/miniz/miniz_export.h +20 -0
- package/thirdparty/miniz/miniz_tdef.c +1602 -0
- package/thirdparty/miniz/miniz_tdef.h +199 -0
- package/thirdparty/miniz/miniz_tinfl.c +778 -0
- package/thirdparty/miniz/miniz_tinfl.h +150 -0
- package/thirdparty/miniz/miniz_zip.c +4895 -0
- package/thirdparty/miniz/miniz_zip.h +454 -0
- package/thirdparty/miniz/readme.md +46 -0
- package/thirdparty/miniz/test.sh +36 -0
- package/thirdparty/miniz/tests/add_in_place_fuzzer.c +87 -0
- package/thirdparty/miniz/tests/catch_amalgamated.cpp +10795 -0
- package/thirdparty/miniz/tests/catch_amalgamated.hpp +13143 -0
- package/thirdparty/miniz/tests/checksum_fuzzer.c +26 -0
- package/thirdparty/miniz/tests/compress_fuzzer.c +91 -0
- package/thirdparty/miniz/tests/flush_fuzzer.c +88 -0
- package/thirdparty/miniz/tests/fuzz_main.c +55 -0
- package/thirdparty/miniz/tests/large_fuzzer.c +133 -0
- package/thirdparty/miniz/tests/main.cpp +185 -0
- package/thirdparty/miniz/tests/miniz_tdefl_fuzzer.cc +115 -0
- package/thirdparty/miniz/tests/miniz_tester.cpp +1881 -0
- package/thirdparty/miniz/tests/miniz_zip_validate_fuzzer.cc +71 -0
- package/thirdparty/miniz/tests/miniz_zip_writer_fuzzer.cc +96 -0
- package/thirdparty/miniz/tests/ossfuzz.sh +48 -0
- package/thirdparty/miniz/tests/small_fuzzer.c +126 -0
- package/thirdparty/miniz/tests/timer.cpp +152 -0
- package/thirdparty/miniz/tests/timer.h +40 -0
- package/thirdparty/miniz/tests/uncompress2_fuzzer.c +21 -0
- package/thirdparty/miniz/tests/uncompress_fuzzer.c +30 -0
- package/thirdparty/miniz/tests/zip.dict +9 -0
- package/thirdparty/miniz/tests/zip_fuzzer.c +63 -0
- package/thirdparty/pugixml/.codecov.yml +7 -0
- package/thirdparty/pugixml/.gitattributes +1 -0
- package/thirdparty/pugixml/CMakeLists.txt +330 -0
- package/thirdparty/pugixml/LICENSE.md +24 -0
- package/thirdparty/pugixml/Makefile +98 -0
- package/thirdparty/pugixml/README.md +81 -0
- package/thirdparty/pugixml/SECURITY.md +9 -0
- package/thirdparty/pugixml/appveyor.yml +50 -0
- package/thirdparty/pugixml/docs/config.adoc +7 -0
- package/thirdparty/pugixml/docs/images/dom_tree.png +0 -0
- package/thirdparty/pugixml/docs/images/vs2005_link1.png +0 -0
- package/thirdparty/pugixml/docs/images/vs2005_link2.png +0 -0
- package/thirdparty/pugixml/docs/images/vs2005_pch1.png +0 -0
- package/thirdparty/pugixml/docs/images/vs2005_pch2.png +0 -0
- package/thirdparty/pugixml/docs/images/vs2005_pch3.png +0 -0
- package/thirdparty/pugixml/docs/images/vs2005_pch4.png +0 -0
- package/thirdparty/pugixml/docs/images/vs2010_link1.png +0 -0
- package/thirdparty/pugixml/docs/images/vs2010_link2.png +0 -0
- package/thirdparty/pugixml/docs/manual.adoc +3326 -0
- package/thirdparty/pugixml/docs/manual.html +6395 -0
- package/thirdparty/pugixml/docs/quickstart.adoc +287 -0
- package/thirdparty/pugixml/docs/quickstart.html +1107 -0
- package/thirdparty/pugixml/docs/samples/character.xml +8 -0
- package/thirdparty/pugixml/docs/samples/custom_memory_management.cpp +27 -0
- package/thirdparty/pugixml/docs/samples/include.cpp +64 -0
- package/thirdparty/pugixml/docs/samples/load_error_handling.cpp +33 -0
- package/thirdparty/pugixml/docs/samples/load_file.cpp +16 -0
- package/thirdparty/pugixml/docs/samples/load_memory.cpp +66 -0
- package/thirdparty/pugixml/docs/samples/load_options.cpp +30 -0
- package/thirdparty/pugixml/docs/samples/load_stream.cpp +97 -0
- package/thirdparty/pugixml/docs/samples/modify_add.cpp +29 -0
- package/thirdparty/pugixml/docs/samples/modify_base.cpp +43 -0
- package/thirdparty/pugixml/docs/samples/modify_remove.cpp +27 -0
- package/thirdparty/pugixml/docs/samples/save_custom_writer.cpp +116 -0
- package/thirdparty/pugixml/docs/samples/save_declaration.cpp +27 -0
- package/thirdparty/pugixml/docs/samples/save_file.cpp +17 -0
- package/thirdparty/pugixml/docs/samples/save_options.cpp +48 -0
- package/thirdparty/pugixml/docs/samples/save_stream.cpp +18 -0
- package/thirdparty/pugixml/docs/samples/save_subtree.cpp +26 -0
- package/thirdparty/pugixml/docs/samples/text.cpp +35 -0
- package/thirdparty/pugixml/docs/samples/transitions.xml +7 -0
- package/thirdparty/pugixml/docs/samples/traverse_base.cpp +51 -0
- package/thirdparty/pugixml/docs/samples/traverse_iter.cpp +27 -0
- package/thirdparty/pugixml/docs/samples/traverse_predicate.cpp +48 -0
- package/thirdparty/pugixml/docs/samples/traverse_rangefor.cpp +32 -0
- package/thirdparty/pugixml/docs/samples/traverse_walker.cpp +35 -0
- package/thirdparty/pugixml/docs/samples/tree.xml +12 -0
- package/thirdparty/pugixml/docs/samples/weekly-shift_jis.xml +78 -0
- package/thirdparty/pugixml/docs/samples/weekly-utf-16.xml +0 -0
- package/thirdparty/pugixml/docs/samples/weekly-utf-8.xml +78 -0
- package/thirdparty/pugixml/docs/samples/xgconsole.xml +12 -0
- package/thirdparty/pugixml/docs/samples/xpath_error.cpp +43 -0
- package/thirdparty/pugixml/docs/samples/xpath_query.cpp +36 -0
- package/thirdparty/pugixml/docs/samples/xpath_select.cpp +28 -0
- package/thirdparty/pugixml/docs/samples/xpath_variables.cpp +38 -0
- package/thirdparty/pugixml/readme.txt +50 -0
- package/thirdparty/pugixml/scripts/archive.py +54 -0
- package/thirdparty/pugixml/scripts/cocoapods_push.sh +4 -0
- package/thirdparty/pugixml/scripts/natvis/pugixml.natvis +77 -0
- package/thirdparty/pugixml/scripts/natvis/pugixml_compact.natvis +506 -0
- package/thirdparty/pugixml/scripts/nuget/build/native/pugixml-propertiesui.xml +17 -0
- package/thirdparty/pugixml/scripts/nuget/build/native/pugixml.targets +28 -0
- package/thirdparty/pugixml/scripts/nuget/pugixml.nuspec +20 -0
- package/thirdparty/pugixml/scripts/nuget_build.ps1 +60 -0
- package/thirdparty/pugixml/scripts/premake4.lua +92 -0
- package/thirdparty/pugixml/scripts/pugixml-config.cmake.in +12 -0
- package/thirdparty/pugixml/scripts/pugixml.pc.in +11 -0
- package/thirdparty/pugixml/scripts/pugixml.podspec +14 -0
- package/thirdparty/pugixml/scripts/pugixml.xcodeproj/project.pbxproj +212 -0
- package/thirdparty/pugixml/scripts/pugixml_airplay.mkf +13 -0
- package/thirdparty/pugixml/scripts/pugixml_codeblocks.cbp +44 -0
- package/thirdparty/pugixml/scripts/pugixml_codelite.project +56 -0
- package/thirdparty/pugixml/scripts/pugixml_dll.rc +45 -0
- package/thirdparty/pugixml/scripts/pugixml_vs2005.vcproj +343 -0
- package/thirdparty/pugixml/scripts/pugixml_vs2005_static.vcproj +343 -0
- package/thirdparty/pugixml/scripts/pugixml_vs2008.vcproj +339 -0
- package/thirdparty/pugixml/scripts/pugixml_vs2008_static.vcproj +339 -0
- package/thirdparty/pugixml/scripts/pugixml_vs2010.vcxproj +191 -0
- package/thirdparty/pugixml/scripts/pugixml_vs2010_static.vcxproj +191 -0
- package/thirdparty/pugixml/scripts/pugixml_vs2013.vcxproj +199 -0
- package/thirdparty/pugixml/scripts/pugixml_vs2013_static.vcxproj +199 -0
- package/thirdparty/pugixml/scripts/pugixml_vs2015.vcxproj +172 -0
- package/thirdparty/pugixml/scripts/pugixml_vs2015_static.vcxproj +176 -0
- package/thirdparty/pugixml/scripts/pugixml_vs2017.vcxproj +172 -0
- package/thirdparty/pugixml/scripts/pugixml_vs2017_static.vcxproj +176 -0
- package/thirdparty/pugixml/scripts/pugixml_vs2019.vcxproj +176 -0
- package/thirdparty/pugixml/scripts/pugixml_vs2019_static.vcxproj +180 -0
- package/thirdparty/pugixml/scripts/pugixml_vs2022.vcxproj +176 -0
- package/thirdparty/pugixml/scripts/pugixml_vs2022_static.vcxproj +180 -0
- package/thirdparty/pugixml/scripts/pugixml_vs2026.vcxproj +176 -0
- package/thirdparty/pugixml/scripts/pugixml_vs2026_static.vcxproj +180 -0
- package/thirdparty/pugixml/scripts/sbom.cdx.json +47 -0
- package/thirdparty/pugixml/src/pugiconfig.hpp +81 -0
- package/thirdparty/pugixml/src/pugixml.cpp +13776 -0
- package/thirdparty/pugixml/src/pugixml.hpp +1604 -0
- package/thirdparty/pugixml/tests/allocator.cpp +175 -0
- package/thirdparty/pugixml/tests/allocator.hpp +10 -0
- package/thirdparty/pugixml/tests/autotest-appveyor.ps1 +93 -0
- package/thirdparty/pugixml/tests/cmake-appveyor.ps1 +57 -0
- package/thirdparty/pugixml/tests/data/empty.xml +0 -0
- package/thirdparty/pugixml/tests/data/large.xml +1 -0
- package/thirdparty/pugixml/tests/data/latintest_latin1.xml +1 -0
- package/thirdparty/pugixml/tests/data/latintest_utf8.xml +1 -0
- package/thirdparty/pugixml/tests/data/multiline.xml +3 -0
- package/thirdparty/pugixml/tests/data/small.xml +1 -0
- package/thirdparty/pugixml/tests/data/truncation.xml +19 -0
- package/thirdparty/pugixml/tests/data/utftest_utf16_be.xml +0 -0
- package/thirdparty/pugixml/tests/data/utftest_utf16_be_bom.xml +0 -0
- package/thirdparty/pugixml/tests/data/utftest_utf16_be_clean.xml +0 -0
- package/thirdparty/pugixml/tests/data/utftest_utf16_be_nodecl.xml +0 -0
- package/thirdparty/pugixml/tests/data/utftest_utf16_le.xml +0 -0
- package/thirdparty/pugixml/tests/data/utftest_utf16_le_bom.xml +0 -0
- package/thirdparty/pugixml/tests/data/utftest_utf16_le_clean.xml +0 -0
- package/thirdparty/pugixml/tests/data/utftest_utf16_le_nodecl.xml +0 -0
- package/thirdparty/pugixml/tests/data/utftest_utf32_be.xml +0 -0
- package/thirdparty/pugixml/tests/data/utftest_utf32_be_bom.xml +0 -0
- package/thirdparty/pugixml/tests/data/utftest_utf32_be_clean.xml +0 -0
- package/thirdparty/pugixml/tests/data/utftest_utf32_be_nodecl.xml +0 -0
- package/thirdparty/pugixml/tests/data/utftest_utf32_le.xml +0 -0
- package/thirdparty/pugixml/tests/data/utftest_utf32_le_bom.xml +0 -0
- package/thirdparty/pugixml/tests/data/utftest_utf32_le_clean.xml +0 -0
- package/thirdparty/pugixml/tests/data/utftest_utf32_le_nodecl.xml +0 -0
- package/thirdparty/pugixml/tests/data/utftest_utf8.xml +87 -0
- package/thirdparty/pugixml/tests/data/utftest_utf8_bom.xml +87 -0
- package/thirdparty/pugixml/tests/data/utftest_utf8_clean.xml +84 -0
- package/thirdparty/pugixml/tests/data/utftest_utf8_nodecl.xml +86 -0
- package/thirdparty/pugixml/tests/data//321/202/320/265/321/201/321/202.xml +1 -0
- package/thirdparty/pugixml/tests/data_fuzz_parse/basic.xml +1 -0
- package/thirdparty/pugixml/tests/data_fuzz_parse/doctype.xml +1 -0
- package/thirdparty/pugixml/tests/data_fuzz_parse/refs.xml +1 -0
- package/thirdparty/pugixml/tests/data_fuzz_parse/types.xml +1 -0
- package/thirdparty/pugixml/tests/data_fuzz_parse/utf16.xml +0 -0
- package/thirdparty/pugixml/tests/data_fuzz_parse/utf32.xml +0 -0
- package/thirdparty/pugixml/tests/data_fuzz_xpath/basic.xpath +1 -0
- package/thirdparty/pugixml/tests/data_fuzz_xpath/functions.xpath +1 -0
- package/thirdparty/pugixml/tests/data_fuzz_xpath/math.xpath +1 -0
- package/thirdparty/pugixml/tests/data_fuzz_xpath/path.xpath +1 -0
- package/thirdparty/pugixml/tests/data_fuzz_xpath/predicate.xpath +1 -0
- package/thirdparty/pugixml/tests/fuzz_parse.cpp +14 -0
- package/thirdparty/pugixml/tests/fuzz_parse.dict +72 -0
- package/thirdparty/pugixml/tests/fuzz_setup.sh +11 -0
- package/thirdparty/pugixml/tests/fuzz_xpath.cpp +46 -0
- package/thirdparty/pugixml/tests/fuzz_xpath.dict +72 -0
- package/thirdparty/pugixml/tests/helpers.hpp +114 -0
- package/thirdparty/pugixml/tests/main.cpp +218 -0
- package/thirdparty/pugixml/tests/test.cpp +220 -0
- package/thirdparty/pugixml/tests/test.hpp +175 -0
- package/thirdparty/pugixml/tests/test_compact.cpp +150 -0
- package/thirdparty/pugixml/tests/test_deprecated.cpp +25 -0
- package/thirdparty/pugixml/tests/test_document.cpp +1910 -0
- package/thirdparty/pugixml/tests/test_dom_modify.cpp +2122 -0
- package/thirdparty/pugixml/tests/test_dom_text.cpp +601 -0
- package/thirdparty/pugixml/tests/test_dom_traverse.cpp +1481 -0
- package/thirdparty/pugixml/tests/test_header_guard.cpp +3 -0
- package/thirdparty/pugixml/tests/test_header_iosfwd_1.cpp +3 -0
- package/thirdparty/pugixml/tests/test_header_iosfwd_2.cpp +3 -0
- package/thirdparty/pugixml/tests/test_header_iostream_1.cpp +3 -0
- package/thirdparty/pugixml/tests/test_header_iostream_2.cpp +3 -0
- package/thirdparty/pugixml/tests/test_header_only_1.cpp +21 -0
- package/thirdparty/pugixml/tests/test_header_only_2.cpp +21 -0
- package/thirdparty/pugixml/tests/test_header_string_1.cpp +3 -0
- package/thirdparty/pugixml/tests/test_header_string_2.cpp +3 -0
- package/thirdparty/pugixml/tests/test_header_string_iostream.cpp +5 -0
- package/thirdparty/pugixml/tests/test_memory.cpp +303 -0
- package/thirdparty/pugixml/tests/test_parse.cpp +1463 -0
- package/thirdparty/pugixml/tests/test_parse_doctype.cpp +366 -0
- package/thirdparty/pugixml/tests/test_unicode.cpp +152 -0
- package/thirdparty/pugixml/tests/test_version.cpp +5 -0
- package/thirdparty/pugixml/tests/test_write.cpp +757 -0
- package/thirdparty/pugixml/tests/test_xpath.cpp +833 -0
- package/thirdparty/pugixml/tests/test_xpath_api.cpp +646 -0
- package/thirdparty/pugixml/tests/test_xpath_functions.cpp +844 -0
- package/thirdparty/pugixml/tests/test_xpath_operators.cpp +566 -0
- package/thirdparty/pugixml/tests/test_xpath_parse.cpp +428 -0
- package/thirdparty/pugixml/tests/test_xpath_paths.cpp +787 -0
- package/thirdparty/pugixml/tests/test_xpath_paths_abbrev_w3c.cpp +219 -0
- package/thirdparty/pugixml/tests/test_xpath_paths_w3c.cpp +312 -0
- package/thirdparty/pugixml/tests/test_xpath_variables.cpp +683 -0
- package/thirdparty/pugixml/tests/test_xpath_xalan_1.cpp +411 -0
- package/thirdparty/pugixml/tests/test_xpath_xalan_2.cpp +417 -0
- package/thirdparty/pugixml/tests/test_xpath_xalan_3.cpp +321 -0
- package/thirdparty/pugixml/tests/test_xpath_xalan_4.cpp +300 -0
- package/thirdparty/pugixml/tests/test_xpath_xalan_5.cpp +295 -0
- package/thirdparty/pugixml/tests/writer_string.cpp +79 -0
- package/thirdparty/pugixml/tests/writer_string.hpp +27 -0
- package/scripts/prepare-openxlsx.js +0 -126
|
@@ -0,0 +1,601 @@
|
|
|
1
|
+
#include "test.hpp"
|
|
2
|
+
|
|
3
|
+
#include "helpers.hpp"
|
|
4
|
+
|
|
5
|
+
#include <limits.h>
|
|
6
|
+
|
|
7
|
+
using namespace pugi;
|
|
8
|
+
|
|
9
|
+
TEST_XML_FLAGS(dom_text_empty, "<node><a>foo</a><b><![CDATA[bar]]></b><c><?pi value?></c><d/></node>", parse_default | parse_pi)
|
|
10
|
+
{
|
|
11
|
+
xml_node node = doc.child(STR("node"));
|
|
12
|
+
|
|
13
|
+
CHECK(node.child(STR("a")).text());
|
|
14
|
+
CHECK(node.child(STR("b")).text());
|
|
15
|
+
CHECK(!node.child(STR("c")).text());
|
|
16
|
+
CHECK(!node.child(STR("d")).text());
|
|
17
|
+
CHECK(!xml_node().text());
|
|
18
|
+
CHECK(!xml_text());
|
|
19
|
+
|
|
20
|
+
generic_empty_test(node.child(STR("a")).text());
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
TEST_XML(dom_text_bool_ops, "<node>foo</node>")
|
|
24
|
+
{
|
|
25
|
+
generic_bool_ops_test(doc.child(STR("node")).text());
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
TEST_XML_FLAGS(dom_text_get, "<node><a>foo</a><b><node/><![CDATA[bar]]></b><c><?pi value?></c><d/></node>", parse_default | parse_pi)
|
|
29
|
+
{
|
|
30
|
+
xml_node node = doc.child(STR("node"));
|
|
31
|
+
|
|
32
|
+
CHECK_STRING(node.child(STR("a")).text().get(), STR("foo"));
|
|
33
|
+
CHECK_STRING(node.child(STR("a")).first_child().text().get(), STR("foo"));
|
|
34
|
+
|
|
35
|
+
CHECK_STRING(node.child(STR("b")).text().get(), STR("bar"));
|
|
36
|
+
CHECK_STRING(node.child(STR("b")).last_child().text().get(), STR("bar"));
|
|
37
|
+
|
|
38
|
+
CHECK_STRING(node.child(STR("c")).text().get(), STR(""));
|
|
39
|
+
CHECK_STRING(node.child(STR("c")).first_child().text().get(), STR(""));
|
|
40
|
+
|
|
41
|
+
CHECK_STRING(node.child(STR("d")).text().get(), STR(""));
|
|
42
|
+
|
|
43
|
+
CHECK_STRING(xml_node().text().get(), STR(""));
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
TEST_XML_FLAGS(dom_text_as_string, "<node><a>foo</a><b><node/><![CDATA[bar]]></b><c><?pi value?></c><d/></node>", parse_default | parse_pi)
|
|
47
|
+
{
|
|
48
|
+
xml_node node = doc.child(STR("node"));
|
|
49
|
+
|
|
50
|
+
CHECK_STRING(node.child(STR("a")).text().as_string(), STR("foo"));
|
|
51
|
+
CHECK_STRING(node.child(STR("a")).first_child().text().as_string(), STR("foo"));
|
|
52
|
+
|
|
53
|
+
CHECK_STRING(node.child(STR("b")).text().as_string(), STR("bar"));
|
|
54
|
+
CHECK_STRING(node.child(STR("b")).last_child().text().as_string(), STR("bar"));
|
|
55
|
+
|
|
56
|
+
CHECK_STRING(node.child(STR("c")).text().as_string(), STR(""));
|
|
57
|
+
CHECK_STRING(node.child(STR("c")).first_child().text().as_string(), STR(""));
|
|
58
|
+
|
|
59
|
+
CHECK_STRING(node.child(STR("d")).text().as_string(), STR(""));
|
|
60
|
+
|
|
61
|
+
CHECK_STRING(xml_node().text().as_string(), STR(""));
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
TEST_XML(dom_text_as_int, "<node><text1>1</text1><text2>-1</text2><text3>-2147483648</text3><text4>2147483647</text4><text5>0</text5></node>")
|
|
65
|
+
{
|
|
66
|
+
xml_node node = doc.child(STR("node"));
|
|
67
|
+
|
|
68
|
+
CHECK(xml_text().as_int() == 0);
|
|
69
|
+
CHECK(node.child(STR("text1")).text().as_int() == 1);
|
|
70
|
+
CHECK(node.child(STR("text2")).text().as_int() == -1);
|
|
71
|
+
CHECK(node.child(STR("text3")).text().as_int() == -2147483647 - 1);
|
|
72
|
+
CHECK(node.child(STR("text4")).text().as_int() == 2147483647);
|
|
73
|
+
CHECK(node.child(STR("text5")).text().as_int() == 0);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
TEST_XML(dom_text_as_int_hex, "<node><text1>0777</text1><text2>0x5ab</text2><text3>0XFf</text3><text4>-0x20</text4><text5>-0x80000000</text5><text6>0x</text6></node>")
|
|
77
|
+
{
|
|
78
|
+
xml_node node = doc.child(STR("node"));
|
|
79
|
+
|
|
80
|
+
CHECK(node.child(STR("text1")).text().as_int() == 777); // no octal support! intentional
|
|
81
|
+
CHECK(node.child(STR("text2")).text().as_int() == 1451);
|
|
82
|
+
CHECK(node.child(STR("text3")).text().as_int() == 255);
|
|
83
|
+
CHECK(node.child(STR("text4")).text().as_int() == -32);
|
|
84
|
+
CHECK(node.child(STR("text5")).text().as_int() == -2147483647 - 1);
|
|
85
|
+
CHECK(node.child(STR("text6")).text().as_int() == 0);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
TEST_XML(dom_text_as_uint, "<node><text1>0</text1><text2>1</text2><text3>2147483647</text3><text4>4294967295</text4><text5>0</text5></node>")
|
|
89
|
+
{
|
|
90
|
+
xml_node node = doc.child(STR("node"));
|
|
91
|
+
|
|
92
|
+
CHECK(xml_text().as_uint() == 0);
|
|
93
|
+
CHECK(node.child(STR("text1")).text().as_uint() == 0);
|
|
94
|
+
CHECK(node.child(STR("text2")).text().as_uint() == 1);
|
|
95
|
+
CHECK(node.child(STR("text3")).text().as_uint() == 2147483647);
|
|
96
|
+
CHECK(node.child(STR("text4")).text().as_uint() == 4294967295u);
|
|
97
|
+
CHECK(node.child(STR("text5")).text().as_uint() == 0);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
TEST_XML(dom_text_as_uint_hex, "<node><text1>0777</text1><text2>0x5ab</text2><text3>0XFf</text3><text4>0x20</text4><text5>0xFFFFFFFF</text5><text6>0x</text6></node>")
|
|
101
|
+
{
|
|
102
|
+
xml_node node = doc.child(STR("node"));
|
|
103
|
+
|
|
104
|
+
CHECK(node.child(STR("text1")).text().as_uint() == 777); // no octal support! intentional
|
|
105
|
+
CHECK(node.child(STR("text2")).text().as_uint() == 1451);
|
|
106
|
+
CHECK(node.child(STR("text3")).text().as_uint() == 255);
|
|
107
|
+
CHECK(node.child(STR("text4")).text().as_uint() == 32);
|
|
108
|
+
CHECK(node.child(STR("text5")).text().as_uint() == 4294967295u);
|
|
109
|
+
CHECK(node.child(STR("text6")).text().as_uint() == 0);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
TEST_XML(dom_text_as_integer_space, "<node><text1> \t\n1234</text1><text2>\n\t 0x123</text2><text3>- 16</text3><text4>- 0x10</text4></node>")
|
|
113
|
+
{
|
|
114
|
+
xml_node node = doc.child(STR("node"));
|
|
115
|
+
|
|
116
|
+
CHECK(node.child(STR("text1")).text().as_int() == 1234);
|
|
117
|
+
CHECK(node.child(STR("text2")).text().as_int() == 291);
|
|
118
|
+
CHECK(node.child(STR("text3")).text().as_int() == 0);
|
|
119
|
+
CHECK(node.child(STR("text4")).text().as_int() == 0);
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
TEST_XML(dom_text_as_float, "<node><text1>0</text1><text2>1</text2><text3>0.12</text3><text4>-5.1</text4><text5>3e-4</text5><text6>3.14159265358979323846</text6><text7> \t\n+2.5</text7></node>")
|
|
123
|
+
{
|
|
124
|
+
xml_node node = doc.child(STR("node"));
|
|
125
|
+
|
|
126
|
+
CHECK(xml_text().as_float() == 0);
|
|
127
|
+
CHECK_DOUBLE(double(node.child(STR("text1")).text().as_float()), 0);
|
|
128
|
+
CHECK_DOUBLE(double(node.child(STR("text2")).text().as_float()), 1);
|
|
129
|
+
CHECK_DOUBLE(double(node.child(STR("text3")).text().as_float()), 0.12);
|
|
130
|
+
CHECK_DOUBLE(double(node.child(STR("text4")).text().as_float()), -5.1);
|
|
131
|
+
CHECK_DOUBLE(double(node.child(STR("text5")).text().as_float()), 3e-4);
|
|
132
|
+
CHECK_DOUBLE(double(node.child(STR("text6")).text().as_float()), 3.14159265358979323846);
|
|
133
|
+
CHECK_DOUBLE(double(node.child(STR("text7")).text().as_float()), 2.5);
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
TEST_XML(dom_text_as_double, "<node><text1>0</text1><text2>1</text2><text3>0.12</text3><text4>-5.1</text4><text5>3e-4</text5><text6>3.14159265358979323846</text6><text7> \t\n+2.5</text7></node>")
|
|
137
|
+
{
|
|
138
|
+
xml_node node = doc.child(STR("node"));
|
|
139
|
+
|
|
140
|
+
CHECK(xml_text().as_double() == 0);
|
|
141
|
+
CHECK_DOUBLE(node.child(STR("text1")).text().as_double(), 0);
|
|
142
|
+
CHECK_DOUBLE(node.child(STR("text2")).text().as_double(), 1);
|
|
143
|
+
CHECK_DOUBLE(node.child(STR("text3")).text().as_double(), 0.12);
|
|
144
|
+
CHECK_DOUBLE(node.child(STR("text4")).text().as_double(), -5.1);
|
|
145
|
+
CHECK_DOUBLE(node.child(STR("text5")).text().as_double(), 3e-4);
|
|
146
|
+
CHECK_DOUBLE(node.child(STR("text6")).text().as_double(), 3.14159265358979323846);
|
|
147
|
+
CHECK_DOUBLE(node.child(STR("text7")).text().as_double(), 2.5);
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
TEST_XML(dom_text_as_bool, "<node><text1>0</text1><text2>1</text2><text3>true</text3><text4>True</text4><text5>Yes</text5><text6>yes</text6><text7>false</text7></node>")
|
|
151
|
+
{
|
|
152
|
+
xml_node node = doc.child(STR("node"));
|
|
153
|
+
|
|
154
|
+
CHECK(!xml_text().as_bool());
|
|
155
|
+
CHECK(!node.child(STR("text1")).text().as_bool());
|
|
156
|
+
CHECK(node.child(STR("text2")).text().as_bool());
|
|
157
|
+
CHECK(node.child(STR("text3")).text().as_bool());
|
|
158
|
+
CHECK(node.child(STR("text4")).text().as_bool());
|
|
159
|
+
CHECK(node.child(STR("text5")).text().as_bool());
|
|
160
|
+
CHECK(node.child(STR("text6")).text().as_bool());
|
|
161
|
+
CHECK(!node.child(STR("text7")).text().as_bool());
|
|
162
|
+
|
|
163
|
+
xml_node text = node.append_child(node_pcdata);
|
|
164
|
+
CHECK(text.text().as_bool(true) == true);
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
#ifdef PUGIXML_HAS_LONG_LONG
|
|
168
|
+
TEST_XML(dom_text_as_llong, "<node><text1>1</text1><text2>-1</text2><text3>-9223372036854775808</text3><text4>9223372036854775807</text4><text5>0</text5></node>")
|
|
169
|
+
{
|
|
170
|
+
xml_node node = doc.child(STR("node"));
|
|
171
|
+
|
|
172
|
+
CHECK(xml_text().as_llong() == 0);
|
|
173
|
+
CHECK(node.child(STR("text1")).text().as_llong() == 1);
|
|
174
|
+
CHECK(node.child(STR("text2")).text().as_llong() == -1);
|
|
175
|
+
CHECK(node.child(STR("text3")).text().as_llong() == -9223372036854775807ll - 1);
|
|
176
|
+
CHECK(node.child(STR("text4")).text().as_llong() == 9223372036854775807ll);
|
|
177
|
+
CHECK(node.child(STR("text5")).text().as_llong() == 0);
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
TEST_XML(dom_text_as_llong_hex, "<node><text1>0777</text1><text2>0x5ab</text2><text3>0XFf</text3><text4>-0x20</text4><text5>-0x8000000000000000</text5><text6>0x</text6></node>")
|
|
181
|
+
{
|
|
182
|
+
xml_node node = doc.child(STR("node"));
|
|
183
|
+
|
|
184
|
+
CHECK(node.child(STR("text1")).text().as_llong() == 777); // no octal support! intentional
|
|
185
|
+
CHECK(node.child(STR("text2")).text().as_llong() == 1451);
|
|
186
|
+
CHECK(node.child(STR("text3")).text().as_llong() == 255);
|
|
187
|
+
CHECK(node.child(STR("text4")).text().as_llong() == -32);
|
|
188
|
+
CHECK(node.child(STR("text5")).text().as_llong() == -9223372036854775807ll - 1);
|
|
189
|
+
CHECK(node.child(STR("text6")).text().as_llong() == 0);
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
TEST_XML(dom_text_as_ullong, "<node><text1>0</text1><text2>1</text2><text3>9223372036854775807</text3><text4>18446744073709551615</text4><text5>0</text5></node>")
|
|
193
|
+
{
|
|
194
|
+
xml_node node = doc.child(STR("node"));
|
|
195
|
+
|
|
196
|
+
CHECK(xml_text().as_ullong() == 0);
|
|
197
|
+
CHECK(node.child(STR("text1")).text().as_ullong() == 0);
|
|
198
|
+
CHECK(node.child(STR("text2")).text().as_ullong() == 1);
|
|
199
|
+
CHECK(node.child(STR("text3")).text().as_ullong() == 9223372036854775807ll);
|
|
200
|
+
CHECK(node.child(STR("text4")).text().as_ullong() == 18446744073709551615ull);
|
|
201
|
+
CHECK(node.child(STR("text5")).text().as_ullong() == 0);
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
TEST_XML(dom_text_as_ullong_hex, "<node><text1>0777</text1><text2>0x5ab</text2><text3>0XFf</text3><text4>0x20</text4><text5>0xFFFFFFFFFFFFFFFF</text5><text6>0x</text6></node>")
|
|
205
|
+
{
|
|
206
|
+
xml_node node = doc.child(STR("node"));
|
|
207
|
+
|
|
208
|
+
CHECK(node.child(STR("text1")).text().as_ullong() == 777); // no octal support! intentional
|
|
209
|
+
CHECK(node.child(STR("text2")).text().as_ullong() == 1451);
|
|
210
|
+
CHECK(node.child(STR("text3")).text().as_ullong() == 255);
|
|
211
|
+
CHECK(node.child(STR("text4")).text().as_ullong() == 32);
|
|
212
|
+
CHECK(node.child(STR("text5")).text().as_ullong() == 18446744073709551615ull);
|
|
213
|
+
CHECK(node.child(STR("text6")).text().as_ullong() == 0);
|
|
214
|
+
}
|
|
215
|
+
#endif
|
|
216
|
+
|
|
217
|
+
TEST_XML(dom_text_get_no_state, "<node/>")
|
|
218
|
+
{
|
|
219
|
+
xml_node node = doc.child(STR("node"));
|
|
220
|
+
xml_text t = node.text();
|
|
221
|
+
|
|
222
|
+
CHECK(!t);
|
|
223
|
+
CHECK(t.get() && *t.get() == 0);
|
|
224
|
+
CHECK(!node.first_child());
|
|
225
|
+
|
|
226
|
+
node.append_child(node_pcdata);
|
|
227
|
+
|
|
228
|
+
CHECK(t);
|
|
229
|
+
CHECK_STRING(t.get(), STR(""));
|
|
230
|
+
|
|
231
|
+
node.first_child().set_value(STR("test"));
|
|
232
|
+
|
|
233
|
+
CHECK(t);
|
|
234
|
+
CHECK_STRING(t.get(), STR("test"));
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
TEST_XML(dom_text_set, "<node/>")
|
|
238
|
+
{
|
|
239
|
+
xml_node node = doc.child(STR("node"));
|
|
240
|
+
xml_text t = node.text();
|
|
241
|
+
|
|
242
|
+
t.set(STR(""));
|
|
243
|
+
CHECK(node.first_child().type() == node_pcdata);
|
|
244
|
+
CHECK_NODE(node, STR("<node/>"));
|
|
245
|
+
|
|
246
|
+
t.set(STR("boo"));
|
|
247
|
+
CHECK(node.first_child().type() == node_pcdata);
|
|
248
|
+
CHECK(node.first_child() == node.last_child());
|
|
249
|
+
CHECK_NODE(node, STR("<node>boo</node>"));
|
|
250
|
+
|
|
251
|
+
t.set(STR("foobarfoobar"));
|
|
252
|
+
CHECK(node.first_child().type() == node_pcdata);
|
|
253
|
+
CHECK(node.first_child() == node.last_child());
|
|
254
|
+
CHECK_NODE(node, STR("<node>foobarfoobar</node>"));
|
|
255
|
+
|
|
256
|
+
t.set(STR(""));
|
|
257
|
+
CHECK(node.first_child().type() == node_pcdata);
|
|
258
|
+
CHECK_NODE(node, STR("<node/>"));
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
TEST_XML(dom_text_set_with_size, "<node/>")
|
|
262
|
+
{
|
|
263
|
+
xml_node node = doc.child(STR("node"));
|
|
264
|
+
xml_text t = node.text();
|
|
265
|
+
|
|
266
|
+
t.set(STR(""), 0);
|
|
267
|
+
CHECK(node.first_child().type() == node_pcdata);
|
|
268
|
+
CHECK_NODE(node, STR("<node/>"));
|
|
269
|
+
|
|
270
|
+
t.set(STR("boo"), 3);
|
|
271
|
+
CHECK(node.first_child().type() == node_pcdata);
|
|
272
|
+
CHECK(node.first_child() == node.last_child());
|
|
273
|
+
CHECK_NODE(node, STR("<node>boo</node>"));
|
|
274
|
+
|
|
275
|
+
t.set(STR("foobarfoobar"), 12);
|
|
276
|
+
CHECK(node.first_child().type() == node_pcdata);
|
|
277
|
+
CHECK(node.first_child() == node.last_child());
|
|
278
|
+
CHECK_NODE(node, STR("<node>foobarfoobar</node>"));
|
|
279
|
+
|
|
280
|
+
t.set(STR(""), 0);
|
|
281
|
+
CHECK(node.first_child().type() == node_pcdata);
|
|
282
|
+
CHECK_NODE(node, STR("<node/>"));
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
TEST_XML(dom_text_set_partially_with_size, "<node/>")
|
|
286
|
+
{
|
|
287
|
+
xml_node node = doc.child(STR("node"));
|
|
288
|
+
xml_text t = node.text();
|
|
289
|
+
|
|
290
|
+
t.set(STR("foo"), 0);
|
|
291
|
+
CHECK(node.first_child().type() == node_pcdata);
|
|
292
|
+
CHECK_NODE(node, STR("<node/>"));
|
|
293
|
+
|
|
294
|
+
t.set(STR("boofoo"), 3);
|
|
295
|
+
CHECK(node.first_child().type() == node_pcdata);
|
|
296
|
+
CHECK(node.first_child() == node.last_child());
|
|
297
|
+
CHECK_NODE(node, STR("<node>boo</node>"));
|
|
298
|
+
|
|
299
|
+
t.set(STR("foobarfoobar"), 3);
|
|
300
|
+
CHECK(node.first_child().type() == node_pcdata);
|
|
301
|
+
CHECK(node.first_child() == node.last_child());
|
|
302
|
+
CHECK_NODE(node, STR("<node>foo</node>"));
|
|
303
|
+
|
|
304
|
+
t.set(STR("foo"), 0);
|
|
305
|
+
CHECK(node.first_child().type() == node_pcdata);
|
|
306
|
+
CHECK_NODE(node, STR("<node/>"));
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
#ifdef PUGIXML_HAS_STRING_VIEW
|
|
310
|
+
TEST_XML(dom_text_set_with_string_view, "<node/>")
|
|
311
|
+
{
|
|
312
|
+
xml_node node = doc.child(STR("node"));
|
|
313
|
+
xml_text t = node.text();
|
|
314
|
+
|
|
315
|
+
t.set(string_view_t(STR("")));
|
|
316
|
+
CHECK(node.first_child().type() == node_pcdata);
|
|
317
|
+
CHECK_NODE(node, STR("<node/>"));
|
|
318
|
+
|
|
319
|
+
t.set(string_view_t(STR("boo")));
|
|
320
|
+
CHECK(node.first_child().type() == node_pcdata);
|
|
321
|
+
CHECK(node.first_child() == node.last_child());
|
|
322
|
+
CHECK_NODE(node, STR("<node>boo</node>"));
|
|
323
|
+
|
|
324
|
+
t.set(string_view_t(STR("foobarfoobar")));
|
|
325
|
+
CHECK(node.first_child().type() == node_pcdata);
|
|
326
|
+
CHECK(node.first_child() == node.last_child());
|
|
327
|
+
CHECK_NODE(node, STR("<node>foobarfoobar</node>"));
|
|
328
|
+
|
|
329
|
+
t.set(string_view_t(STR("")));
|
|
330
|
+
CHECK(node.first_child().type() == node_pcdata);
|
|
331
|
+
CHECK_NODE(node, STR("<node/>"));
|
|
332
|
+
|
|
333
|
+
t.set(string_view_t(STR("something")));
|
|
334
|
+
CHECK(node.first_child().type() == node_pcdata);
|
|
335
|
+
CHECK_NODE(node, STR("<node>something</node>"));
|
|
336
|
+
|
|
337
|
+
// empty string view (null data pointer)
|
|
338
|
+
t.set(string_view_t());
|
|
339
|
+
CHECK(node.first_child().type() == node_pcdata);
|
|
340
|
+
CHECK_NODE(node, STR("<node/>"));
|
|
341
|
+
|
|
342
|
+
t.set(string_view_t(STR("afternulldata")));
|
|
343
|
+
CHECK(node.first_child().type() == node_pcdata);
|
|
344
|
+
CHECK_NODE(node, STR("<node>afternulldata</node>"));
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
TEST_XML(dom_text_set_partially_with_string_view, "<node/>")
|
|
348
|
+
{
|
|
349
|
+
xml_node node = doc.child(STR("node"));
|
|
350
|
+
xml_text t = node.text();
|
|
351
|
+
|
|
352
|
+
t.set(string_view_t(STR("foo"), 0));
|
|
353
|
+
CHECK(node.first_child().type() == node_pcdata);
|
|
354
|
+
CHECK_NODE(node, STR("<node/>"));
|
|
355
|
+
|
|
356
|
+
t.set(string_view_t(STR("boofoo"), 3));
|
|
357
|
+
CHECK(node.first_child().type() == node_pcdata);
|
|
358
|
+
CHECK(node.first_child() == node.last_child());
|
|
359
|
+
CHECK_NODE(node, STR("<node>boo</node>"));
|
|
360
|
+
|
|
361
|
+
t.set(string_view_t(STR("foobarfoobar"), 3));
|
|
362
|
+
CHECK(node.first_child().type() == node_pcdata);
|
|
363
|
+
CHECK(node.first_child() == node.last_child());
|
|
364
|
+
CHECK_NODE(node, STR("<node>foo</node>"));
|
|
365
|
+
|
|
366
|
+
t.set(string_view_t(STR("foo"), 0));
|
|
367
|
+
CHECK(node.first_child().type() == node_pcdata);
|
|
368
|
+
CHECK_NODE(node, STR("<node/>"));
|
|
369
|
+
}
|
|
370
|
+
#endif
|
|
371
|
+
|
|
372
|
+
TEST_XML(dom_text_assign, "<node/>")
|
|
373
|
+
{
|
|
374
|
+
xml_node node = doc.child(STR("node"));
|
|
375
|
+
|
|
376
|
+
node.append_child(STR("text1")).text() = STR("v1");
|
|
377
|
+
xml_text() = STR("v1");
|
|
378
|
+
|
|
379
|
+
node.append_child(STR("text2")).text() = -2147483647;
|
|
380
|
+
node.append_child(STR("text3")).text() = -2147483647 - 1;
|
|
381
|
+
xml_text() = -2147483647 - 1;
|
|
382
|
+
|
|
383
|
+
node.append_child(STR("text4")).text() = 4294967295u;
|
|
384
|
+
node.append_child(STR("text5")).text() = 4294967294u;
|
|
385
|
+
xml_text() = 4294967295u;
|
|
386
|
+
|
|
387
|
+
node.append_child(STR("text6")).text() = 0.5;
|
|
388
|
+
xml_text() = 0.5;
|
|
389
|
+
|
|
390
|
+
node.append_child(STR("text7")).text() = 0.25f;
|
|
391
|
+
xml_text() = 0.25f;
|
|
392
|
+
|
|
393
|
+
node.append_child(STR("text8")).text() = true;
|
|
394
|
+
xml_text() = true;
|
|
395
|
+
|
|
396
|
+
#ifdef PUGIXML_HAS_STRING_VIEW
|
|
397
|
+
node.append_child(string_view_t(STR("text9"))).text() = string_view_t(STR("v2"));
|
|
398
|
+
xml_text() = string_view_t(STR("text9"));
|
|
399
|
+
#else
|
|
400
|
+
node.append_child(STR("text9")).text() = STR("v2");
|
|
401
|
+
#endif
|
|
402
|
+
|
|
403
|
+
CHECK_NODE(node, STR("<node><text1>v1</text1><text2>-2147483647</text2><text3>-2147483648</text3><text4>4294967295</text4><text5>4294967294</text5><text6>0.5</text6><text7>0.25</text7><text8>true</text8><text9>v2</text9></node>"));
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
TEST_XML(dom_text_set_value, "<node/>")
|
|
407
|
+
{
|
|
408
|
+
xml_node node = doc.child(STR("node"));
|
|
409
|
+
|
|
410
|
+
CHECK(node.append_child(STR("text1")).text().set(STR("v1")));
|
|
411
|
+
CHECK(!xml_text().set(STR("v1")));
|
|
412
|
+
CHECK(!xml_text().set(STR("v1"), 2));
|
|
413
|
+
#ifdef PUGIXML_HAS_STRING_VIEW
|
|
414
|
+
CHECK(!xml_text().set(string_view_t(STR("v1"))));
|
|
415
|
+
#endif
|
|
416
|
+
|
|
417
|
+
CHECK(node.append_child(STR("text2")).text().set(-2147483647));
|
|
418
|
+
CHECK(node.append_child(STR("text3")).text().set(-2147483647 - 1));
|
|
419
|
+
CHECK(!xml_text().set(-2147483647 - 1));
|
|
420
|
+
|
|
421
|
+
CHECK(node.append_child(STR("text4")).text().set(4294967295u));
|
|
422
|
+
CHECK(node.append_child(STR("text5")).text().set(4294967294u));
|
|
423
|
+
CHECK(!xml_text().set(4294967295u));
|
|
424
|
+
|
|
425
|
+
CHECK(node.append_child(STR("text6")).text().set(0.5));
|
|
426
|
+
CHECK(!xml_text().set(0.5));
|
|
427
|
+
|
|
428
|
+
CHECK(node.append_child(STR("text7")).text().set(0.25f));
|
|
429
|
+
CHECK(!xml_text().set(0.25f));
|
|
430
|
+
|
|
431
|
+
CHECK(node.append_child(STR("text8")).text().set(true));
|
|
432
|
+
CHECK(!xml_text().set(true));
|
|
433
|
+
|
|
434
|
+
CHECK_NODE(node, STR("<node><text1>v1</text1><text2>-2147483647</text2><text3>-2147483648</text3><text4>4294967295</text4><text5>4294967294</text5><text6>0.5</text6><text7>0.25</text7><text8>true</text8></node>"));
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
#if LONG_MAX > 2147483647
|
|
438
|
+
TEST_XML(dom_text_assign_long, "<node/>")
|
|
439
|
+
{
|
|
440
|
+
xml_node node = doc.child(STR("node"));
|
|
441
|
+
|
|
442
|
+
node.append_child(STR("text1")).text() = -9223372036854775807l;
|
|
443
|
+
node.append_child(STR("text2")).text() = -9223372036854775807l - 1;
|
|
444
|
+
xml_text() = -9223372036854775807l - 1;
|
|
445
|
+
|
|
446
|
+
node.append_child(STR("text3")).text() = 18446744073709551615ul;
|
|
447
|
+
node.append_child(STR("text4")).text() = 18446744073709551614ul;
|
|
448
|
+
xml_text() = 18446744073709551615ul;
|
|
449
|
+
|
|
450
|
+
CHECK_NODE(node, STR("<node><text1>-9223372036854775807</text1><text2>-9223372036854775808</text2><text3>18446744073709551615</text3><text4>18446744073709551614</text4></node>"));
|
|
451
|
+
}
|
|
452
|
+
|
|
453
|
+
TEST_XML(dom_text_set_value_long, "<node/>")
|
|
454
|
+
{
|
|
455
|
+
xml_node node = doc.child(STR("node"));
|
|
456
|
+
|
|
457
|
+
CHECK(node.append_child(STR("text1")).text().set(-9223372036854775807l));
|
|
458
|
+
CHECK(node.append_child(STR("text2")).text().set(-9223372036854775807l - 1));
|
|
459
|
+
CHECK(!xml_text().set(-9223372036854775807l - 1));
|
|
460
|
+
|
|
461
|
+
CHECK(node.append_child(STR("text3")).text().set(18446744073709551615ul));
|
|
462
|
+
CHECK(node.append_child(STR("text4")).text().set(18446744073709551614ul));
|
|
463
|
+
CHECK(!xml_text().set(18446744073709551615ul));
|
|
464
|
+
|
|
465
|
+
CHECK_NODE(node, STR("<node><text1>-9223372036854775807</text1><text2>-9223372036854775808</text2><text3>18446744073709551615</text3><text4>18446744073709551614</text4></node>"));
|
|
466
|
+
}
|
|
467
|
+
#else
|
|
468
|
+
TEST_XML(dom_text_assign_long, "<node/>")
|
|
469
|
+
{
|
|
470
|
+
xml_node node = doc.child(STR("node"));
|
|
471
|
+
|
|
472
|
+
node.append_child(STR("text1")).text() = -2147483647l;
|
|
473
|
+
node.append_child(STR("text2")).text() = -2147483647l - 1;
|
|
474
|
+
xml_text() = -2147483647l - 1;
|
|
475
|
+
|
|
476
|
+
node.append_child(STR("text3")).text() = 4294967295ul;
|
|
477
|
+
node.append_child(STR("text4")).text() = 4294967294ul;
|
|
478
|
+
xml_text() = 4294967295ul;
|
|
479
|
+
|
|
480
|
+
CHECK_NODE(node, STR("<node><text1>-2147483647</text1><text2>-2147483648</text2><text3>4294967295</text3><text4>4294967294</text4></node>"));
|
|
481
|
+
}
|
|
482
|
+
|
|
483
|
+
TEST_XML(dom_text_set_value_long, "<node/>")
|
|
484
|
+
{
|
|
485
|
+
xml_node node = doc.child(STR("node"));
|
|
486
|
+
|
|
487
|
+
CHECK(node.append_child(STR("text1")).text().set(-2147483647l));
|
|
488
|
+
CHECK(node.append_child(STR("text2")).text().set(-2147483647l - 1));
|
|
489
|
+
CHECK(!xml_text().set(-2147483647l - 1));
|
|
490
|
+
|
|
491
|
+
CHECK(node.append_child(STR("text3")).text().set(4294967295ul));
|
|
492
|
+
CHECK(node.append_child(STR("text4")).text().set(4294967294ul));
|
|
493
|
+
CHECK(!xml_text().set(4294967295ul));
|
|
494
|
+
|
|
495
|
+
CHECK_NODE(node, STR("<node><text1>-2147483647</text1><text2>-2147483648</text2><text3>4294967295</text3><text4>4294967294</text4></node>"));
|
|
496
|
+
}
|
|
497
|
+
#endif
|
|
498
|
+
|
|
499
|
+
#ifdef PUGIXML_HAS_LONG_LONG
|
|
500
|
+
TEST_XML(dom_text_assign_llong, "<node/>")
|
|
501
|
+
{
|
|
502
|
+
xml_node node = doc.child(STR("node"));
|
|
503
|
+
|
|
504
|
+
node.append_child(STR("text1")).text() = -9223372036854775807ll;
|
|
505
|
+
node.append_child(STR("text2")).text() = -9223372036854775807ll - 1;
|
|
506
|
+
xml_text() = -9223372036854775807ll - 1;
|
|
507
|
+
|
|
508
|
+
node.append_child(STR("text3")).text() = 18446744073709551615ull;
|
|
509
|
+
node.append_child(STR("text4")).text() = 18446744073709551614ull;
|
|
510
|
+
xml_text() = 18446744073709551615ull;
|
|
511
|
+
|
|
512
|
+
CHECK_NODE(node, STR("<node><text1>-9223372036854775807</text1><text2>-9223372036854775808</text2><text3>18446744073709551615</text3><text4>18446744073709551614</text4></node>"));
|
|
513
|
+
}
|
|
514
|
+
|
|
515
|
+
TEST_XML(dom_text_set_value_llong, "<node/>")
|
|
516
|
+
{
|
|
517
|
+
xml_node node = doc.child(STR("node"));
|
|
518
|
+
|
|
519
|
+
CHECK(node.append_child(STR("text1")).text().set(-9223372036854775807ll));
|
|
520
|
+
CHECK(node.append_child(STR("text2")).text().set(-9223372036854775807ll - 1));
|
|
521
|
+
CHECK(!xml_text().set(-9223372036854775807ll - 1));
|
|
522
|
+
|
|
523
|
+
CHECK(node.append_child(STR("text3")).text().set(18446744073709551615ull));
|
|
524
|
+
CHECK(node.append_child(STR("text4")).text().set(18446744073709551614ull));
|
|
525
|
+
CHECK(!xml_text().set(18446744073709551615ull));
|
|
526
|
+
|
|
527
|
+
CHECK_NODE(node, STR("<node><text1>-9223372036854775807</text1><text2>-9223372036854775808</text2><text3>18446744073709551615</text3><text4>18446744073709551614</text4></node>"));
|
|
528
|
+
}
|
|
529
|
+
#endif
|
|
530
|
+
|
|
531
|
+
TEST_XML(dom_text_middle, "<node><c1>notthisone</c1>text<c2/></node>")
|
|
532
|
+
{
|
|
533
|
+
xml_node node = doc.child(STR("node"));
|
|
534
|
+
xml_text t = node.text();
|
|
535
|
+
|
|
536
|
+
CHECK_STRING(t.get(), STR("text"));
|
|
537
|
+
t.set(STR("notext"));
|
|
538
|
+
|
|
539
|
+
CHECK_NODE(node, STR("<node><c1>notthisone</c1>notext<c2/></node>"));
|
|
540
|
+
CHECK(node.remove_child(t.data()));
|
|
541
|
+
|
|
542
|
+
CHECK(!t);
|
|
543
|
+
CHECK_NODE(node, STR("<node><c1>notthisone</c1><c2/></node>"));
|
|
544
|
+
|
|
545
|
+
t.set(STR("yestext"));
|
|
546
|
+
|
|
547
|
+
CHECK(t);
|
|
548
|
+
CHECK_NODE(node, STR("<node><c1>notthisone</c1><c2/>yestext</node>"));
|
|
549
|
+
CHECK(t.data() == node.last_child());
|
|
550
|
+
}
|
|
551
|
+
|
|
552
|
+
#ifdef PUGIXML_HAS_STRING_VIEW
|
|
553
|
+
TEST_XML(dom_text_middle_string_view, "<node><c1>notthisone</c1>text<c2/></node>")
|
|
554
|
+
{
|
|
555
|
+
xml_node node = doc.child(STR("node"));
|
|
556
|
+
xml_text t = node.text();
|
|
557
|
+
|
|
558
|
+
CHECK_STRING(t.get(), STR("text"));
|
|
559
|
+
t.set(string_view_t(STR("notext")));
|
|
560
|
+
|
|
561
|
+
CHECK_NODE(node, STR("<node><c1>notthisone</c1>notext<c2/></node>"));
|
|
562
|
+
CHECK(node.remove_child(t.data()));
|
|
563
|
+
|
|
564
|
+
CHECK(!t);
|
|
565
|
+
CHECK_NODE(node, STR("<node><c1>notthisone</c1><c2/></node>"));
|
|
566
|
+
|
|
567
|
+
t.set(string_view_t(STR("yestext")));
|
|
568
|
+
|
|
569
|
+
CHECK(t);
|
|
570
|
+
CHECK_NODE(node, STR("<node><c1>notthisone</c1><c2/>yestext</node>"));
|
|
571
|
+
CHECK(t.data() == node.last_child());
|
|
572
|
+
}
|
|
573
|
+
#endif
|
|
574
|
+
|
|
575
|
+
TEST_XML_FLAGS(dom_text_data, "<node><a>foo</a><b><![CDATA[bar]]></b><c><?pi value?></c><d/></node>", parse_default | parse_pi)
|
|
576
|
+
{
|
|
577
|
+
xml_node node = doc.child(STR("node"));
|
|
578
|
+
|
|
579
|
+
CHECK(node.child(STR("a")).text().data() == node.child(STR("a")).first_child());
|
|
580
|
+
CHECK(node.child(STR("b")).text().data() == node.child(STR("b")).first_child());
|
|
581
|
+
CHECK(!node.child(STR("c")).text().data());
|
|
582
|
+
CHECK(!node.child(STR("d")).text().data());
|
|
583
|
+
CHECK(!xml_text().data());
|
|
584
|
+
}
|
|
585
|
+
|
|
586
|
+
TEST(dom_text_defaults)
|
|
587
|
+
{
|
|
588
|
+
xml_text text;
|
|
589
|
+
|
|
590
|
+
CHECK_STRING(text.as_string(STR("foo")), STR("foo"));
|
|
591
|
+
CHECK(text.as_int(42) == 42);
|
|
592
|
+
CHECK(text.as_uint(42) == 42);
|
|
593
|
+
CHECK(text.as_double(42) == 42);
|
|
594
|
+
CHECK(text.as_float(42) == 42);
|
|
595
|
+
CHECK(text.as_bool(true) == true);
|
|
596
|
+
|
|
597
|
+
#ifdef PUGIXML_HAS_LONG_LONG
|
|
598
|
+
CHECK(text.as_llong(42) == 42);
|
|
599
|
+
CHECK(text.as_ullong(42) == 42);
|
|
600
|
+
#endif
|
|
601
|
+
}
|