test.compareJSONFiles
Boolean test.compareJSONFiles(expectedFilePath, actualFilePath)
This function compares the expected JSON file specified by expectedFilePath
with the actual JSON file specified by actualFilePath
. If they are equal, a test result of type PASS is added to the test log and this function returns a true value. Otherwise a test result of type FAIL is added to the test log and a false value is returned. If the files are different the result message details will show for what reason the comparison failed as well as a textual diff.
Note: Due to features and constraints of the used JSON library, non-standard and possibly unwanted JSON might pass the test. Validate the JSON files and make sure their names are unique before calling them with test.compareJSONFiles
.
© 2024 The Qt Company Ltd.
Documentation contributions included herein are the copyrights of
their respective owners.
The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation.
Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property
of their respective owners.