summaryrefslogtreecommitdiff
path: root/tests
AgeCommit message (Collapse)Author
2017-06-16tests: Add more coverage tests for stream loadingArseny Kapoulkine
Cover more failure cases and simplify the streambuf implementation a bit.
2017-06-16Fix BorlandC compilationArseny Kapoulkine
Rename partition to partition3 to resolve conflicts with std::partition.
2017-06-16tests: Improve XPath test coverageArseny Kapoulkine
Add more memory allocation failure tests.
2017-06-16tests: Expand write_flush coverageArseny Kapoulkine
Adjust the buffer size to be right on the edge of the overflow, make sure we actually output " instead of ".
2017-06-15tests: Add xml_buffered_writer coverage testArseny Kapoulkine
This test triggers flush() condition for each optimized write() method.
2017-06-15tests: Add tests for loading special filesArseny Kapoulkine
New tests try to load a folder as an XML document, and a device. Both are intended to exercise some otherwise non-hittable error paths in load_file implementation.
2017-06-14tests: Increase compact_pointer coverageArseny Kapoulkine
This adds tests that complete branch coverage in compact pointer encoding/decoding code (previously first_attribute was always encoded using compact encoding in the entire test suite).
2017-04-03Move libFuzzer build to MakefileArseny Kapoulkine
Now the only thing fuzz_setup.sh does is installing new clang; if system clang supports -fsanitize-coverage then fuzz_setup.sh is not required.
2017-04-03tests: Fix fuzz_setup.shArseny Kapoulkine
The script only worked if clang folder was already created.
2017-03-21tests: Do not use unsigned underflow in test codeArseny Kapoulkine
This triggers a runtime error under integer sanitizer
2017-03-21tests: Fix invalid buffer sizeArseny Kapoulkine
This was triggering an buffer read overflow with asan.
2017-02-11tests: Fix fuzz_setup.shArseny Kapoulkine
Make the file executable, fix Windows newlines and fix clang setup.
2017-02-11tests: Add fuzzing dictionariesArseny Kapoulkine
Hopefully this will allow for better fuzzing coverage
2017-02-09tests: Add XPath fuzzingArseny Kapoulkine
Only fuzz the parser for now.
2017-02-09tests: Add a script to set up fuzzing toolsArseny Kapoulkine
This downloads a clang build that has support for instrumentation, and also downloads and compiles libFuzzer.a.
2017-02-09fuzz: Use libFuzzer instead of afl-fuzzArseny Kapoulkine
This allows us to have faster fuzz cycles since the fuzzer is in-process.
2017-02-09tests: Increase the number of translate callsArseny Kapoulkine
This should make the test fail on a 32-bit target.
2017-02-09tests: Fix clang buildArseny Kapoulkine
2017-02-09tests: Add more XPath out of memory testsArseny Kapoulkine
2017-02-05tests: Add more XPath sorting testsArseny Kapoulkine
Cover empty node case - no XPath query can result in that but it's possible to create a node set with empty nodes manually.
2017-02-02tests: Add more out of memory tests for XPath evaluationArseny Kapoulkine
2017-02-02tests: Add more embed_pcdata testsArseny Kapoulkine
2017-02-01tests: Improve parsing coverageArseny Kapoulkine
Add tests for PI erroring exactly at the buffer boundary with non-zero-terminated buffers (so we have to clear the last character which changes the parsing flow slightly) and a test that makes sure parse_embed_pcdata works properly with XML fragments where PCDATA can be at the root level but can't be embedded into the document node.
2017-02-01tests: Remove redundant coverage testArseny Kapoulkine
The only point was to try to test all paths where we can run out of memory while decoding something. It seems like it may be impossible to actually do this given that we can't run all paths as wchar_t size detection is done at runtime...
2017-01-31tests: Add more tests to increase coverageArseny Kapoulkine
This change adds more thorough tests for attribute conversion as well as some assorted tests that fix gaps in coverage.
2017-01-31tests: Add compact hash table reserve testArseny Kapoulkine
This makes sure all .reserve calls failure paths are covered. These tests don't explicitly test if reserve is present on all paths - this is much harder to test since not all modifications require reserve to be called, so we'll have to rely on a combination of automated testing and sanity checking for this. Also add more parsing out of memory coverage tests.
2017-01-31tests: Add coverage tests for encoding detectionArseny Kapoulkine
Enumerate successfull cases and also cases where the detection stops half-way and results in a different detected encoding.
2017-01-31tests: More XPath coverage testsArseny Kapoulkine
2017-01-31tests: Add more DOM coverage testsArseny Kapoulkine
Add tests for various corner cases of DOM inspection and modification routines.
2017-01-30tests: Add more coverage testsArseny Kapoulkine
Expand out of memory coverage during XPath parsing and evaluation and add some other small tests.
2017-01-30tests: Make predicate out-of-memory test less aggressiveArseny Kapoulkine
Currently this test has very large runtime and relies on the fact that the first memory allocation error causes the test to terminate. This does not work with new behavior of running the query through and reporting the error at the end, so make the runtime reasonable but still generate enough memory to blow past the budget.
2017-01-30tests: Add more tests for branch coverageArseny Kapoulkine
gcov -b surfaced many lines with partial coverage, where branch is only ever taken or not taken, or one of the expressions in a complex conditional is always either true or false. This change adds a series of tests (mostly focusing on XPath) to reduce the number of partially covered lines.
2017-01-30tests: Add an error propagation test for XPathArseny Kapoulkine
This test is supposed to test error coverage in different expressions that are nested in other expressions to reduce the number of never-taken branches in tests (and make sure we aren't missing any).
2017-01-29tests: Add query out of memory testArseny Kapoulkine
2016-11-27scripts: Move archive.py from testsArseny Kapoulkine
2016-11-27Fix archive script to set timestamps properly for .tar.gzv1.8.1Arseny Kapoulkine
By default they are set to Jan 1 1970 which breaks homebrew. Fixes #124.
2016-11-19tests: Fix unused variable warning in some compilersArseny Kapoulkine
The variable is being assigned to but never read when exceptions are disabled.
2016-11-13Change status_end_element_mismatch to point to closing tag nameArseny Kapoulkine
Previously the error offset pointed to the first mismatching character, which can be confusing especially if the start tag name is a prefix of the end tag name. Instead, move the offset to the first character of the name - that way it should be more obvious that the problem is that the entire name mismatches. Fixes #112.
2016-11-13Rewrite archive script into PythonArseny Kapoulkine
Perl version needed Archive::Zip that for some reason is not installed on WSL by default. Use this as an opportunity to remove the last Perl script.
2016-11-09tests: Fix MSVC warningsArseny Kapoulkine
2016-11-09tests: Add a generalized write-roundtrip testArseny Kapoulkine
This test tests two important invariants: - Every combination of write flags has to result in a valid document - Parsing that document and saving the result has to result in identical output We don't test all flags since parse_no_escapes can intentionally result in malformed documents and other flags aren't relevant for node output. Also note that we test both no-whitespace and whitespace version to make sure we don't have unnecessary whitespace added during formatting.
2016-11-09tests: Add a test for format_no_empty_element_tagsArseny Kapoulkine
2016-11-09Update version to 1.8 everywhereArseny Kapoulkine
2016-11-06tests: Don't use ranged for loop in move testsArseny Kapoulkine
Some compilers support move semantics but don't support ranged for.
2016-11-06Refactor move semantics support detectionArseny Kapoulkine
Do it in one place and set PUGIXML_HAS_MOVE if it's available.
2016-10-13Add PUGIXML_OVERRIDE to headers of testsPavel Kryukov
2016-07-15tests: Fix clang warningArseny Kapoulkine
2016-07-14tests: Add tests for latin1 detectionArseny Kapoulkine
2016-04-14Remove extra space in an empty tag for format_rawArseny Kapoulkine
When using format_raw the space in the empty tag (<node />) is the only character that does not have to be there; so format_raw almost results in a minimal XML but not quite. It's pretty unlikely that this is crucial for any users - the formatting change should be benign, and it's better to improve format_raw than to add yet another flag. Fixes #87.
2016-02-02tests: Add tests for long settersArseny Kapoulkine