aboutsummaryrefslogtreecommitdiffstats
path: root/libtests
AgeCommit message (Collapse)Author
2021-12-10Handle bitstream overflow errors more gracefully (fixes #581)Jay Berkenbilt
* Make it a runtime error, not a logic error * Include additional information * Capture it properly in checkLinearization
2021-11-04Add QIntC::range_check_subtractJay Berkenbilt
2021-02-23Spell checkJay Berkenbilt
2021-02-18Add QUtil::path_basenameJay Berkenbilt
2021-02-13QUtil::double_to_string: trim trailing zeroes with option to disableJay Berkenbilt
2021-02-11Allow zone information to be omitted from timestamp stringsJay Berkenbilt
2021-02-09Add QUtil methods for dealing with PDF timestamp stringsJay Berkenbilt
2021-02-08Make newly created name/number trees indirect objectsJay Berkenbilt
2021-02-08Add QUtil::pipe_file and QUtil::file_providerJay Berkenbilt
2021-01-24Use new QPDF{Name,Number}TreeObjectHelper APIJay Berkenbilt
2021-01-24Add iterators to name/number tree helpersJay Berkenbilt
2021-01-24Reimplement name and number tree object helpersJay Berkenbilt
Create a computationally and memory efficient implementation of name and number trees that does binary searches as intended by the data structure rather than loading into a map, which can use a great deal of memory and can be very slow.
2020-12-28Test empty function detectionJay Berkenbilt
2020-11-21Handle negative numbers in QIntC::range_check (fuzz issue 26994)Jay Berkenbilt
2020-10-27Revert removal of unreadCh change for performanceJay Berkenbilt
Turns out unreadCh is much more efficient than seek(-1, SEEK_CUR). Update comments and code to reflect this.
2020-10-25Make libtests depend on qpdfJay Berkenbilt
We need to run qpdf --show-crypto.
2020-10-21Protect numeric conversion against user's locale (fixes #459)Jay Berkenbilt
2020-10-18Stop using InputSource::unreadChJay Berkenbilt
2020-10-16InputSource::unreadCh -- only unread most recently read characterJay Berkenbilt
This is all that ever worked. The test suite was trying to do something different from ClosedFileInputSource.
2020-04-10Use more references when iteratingJay Berkenbilt
When possible, use `for (auto&` or `for (auto const&` when iterating using C++-11 style iterators.
2020-04-06Delegate random number generation to crypto provider (fixes #418)Jay Berkenbilt
2020-04-05JSON: implement pattern keys in schemaJay Berkenbilt
2020-04-04Allow qpdf to be built on systems without wchar_t (fixes #406)Jay Berkenbilt
2020-02-18libtests/cxx11.cc: fix build with gcc 4.8Fabrice Fontaine
Build fails on gcc 4.8 since version 9.1.1 and commit 752416554086d5d34323bc14164d5084db83cfbd: libtests/cxx11.cc: In function 'void do_regex()': libtests/cxx11.cc:347:42: error: 'strlen' is not a member of 'std' std::cregex_iterator m3(str7, str7 + std::strlen(str7), expr4); ^ To fix the build failure, add missing include on cstring Fixes: - http://autobuild.buildroot.org/results/ad7fb68ae87850a85509eed80fd0cae8721b10c5 Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
2020-01-14Pull wmain -> main code from qpdf.cc into QUtil.ccJay Berkenbilt
2020-01-13QUtil::read_lines_from_file: optional EOL preservationJay Berkenbilt
2020-01-13Refactor QUtil::read_lines_from_fileJay Berkenbilt
This commit adds the preserve_eol flags but doesn't implement EOL preservation yet.
2020-01-13Add std::regex to c++11 feature testsJay Berkenbilt
2019-11-09Allow odd/even modifiers in numeric range (fixes #364)Jay Berkenbilt
2019-11-09Run libtests for crypto with all available providersJay Berkenbilt
If QPDF_CRYPTO_PROVIDER is set, just run the tests for the given provider. This is to support cases of running the entire test suite for each provider. If QPDF_CRYPTO_PROVIDER is not set, run the tests that exercise the cyrpto provider for each available provider.
2019-11-09Increase coverage for RC4 testingJay Berkenbilt
2019-11-09See if C++11 features workJay Berkenbilt
2019-09-17Don't assume char is signed in int conversion tests (fixes #361)Jay Berkenbilt
2019-08-31Add remove_file and rename_file to QUtilJay Berkenbilt
2019-08-31spell checkJay Berkenbilt
2019-08-30Add getRefcount to PointerHolder testJay Berkenbilt
2019-08-18SparseOHArrayJay Berkenbilt
2019-06-22Add QUtil::read_file_into_memoryJay Berkenbilt
This code was essentially duplicated between test_driver and standalone_fuzz_target_runner.
2019-06-22Convert remaining public classes to use Members patternJay Berkenbilt
Have classes contain only a single private member of type PointerHolder<Members>. This makes it safe to change the structure of the Members class without breaking binary compatibility. Many of the classes already follow this pattern quite successfully. This brings in the rest of the class that are part of the public API.
2019-06-22Add missing #include <cstring>Jay Berkenbilt
2019-06-21Fix bounds error in utf16_to_utf8 conversionJay Berkenbilt
2019-06-21Fix sign and conversion warnings (major)Jay Berkenbilt
This makes all integer type conversions that have potential data loss explicit with calls that do range checks and raise an exception. After this commit, qpdf builds with no warnings when -Wsign-conversion -Wconversion is used with gcc or clang or when -W3 -Wd4800 is used with MSVC. This significantly reduces the likelihood of potential crashes from bogus integer values. There are some parts of the code that take int when they should take size_t or an offset. Such places would make qpdf not support files with more than 2^31 of something that usually wouldn't be so large. In the event that such a file shows up and is valid, at least qpdf would raise an error in the right spot so the issue could be legitimately addressed rather than failing in some weird way because of a silent overflow condition.
2019-06-21QUtil: add unsigned int/string functionsJay Berkenbilt
2019-06-21New safe type converters in QIntCJay Berkenbilt
2019-03-11Fix json serialization for {x | -1 < x < 1} (fixes #308)Jay Berkenbilt
JSON serialization was preserving the value as presented, but JSON doesn't accept decimal values without a 0 before the decimal point.
2019-01-27Convert pages to form XObjectsJay Berkenbilt
Support conversion of pages to form XObjects and placement of form XObjects on pages.
2019-01-27Move rectangle transformation into QPDFMatrixJay Berkenbilt
2019-01-17Add QUtil::possible_repaired_encodingsJay Berkenbilt
2019-01-17Add status-reporting transcoders to QUtilJay Berkenbilt
2019-01-17QUtil::analyze_encodingJay Berkenbilt