Age | Commit message (Collapse) | Author |
|
These tests currently fail for compact mode because of ->reserve()
failing.
|
|
We now check that appending a child to a moved document performs no
allocations - this is already the case, but if we neglected to copy the
allocator state this test would fail.
|
|
Large test wasn't testing shared parent condition properly - add one
more level of hierarchy so that it works as expected.
|
|
Add a test that checks that static buffer pointer was moved correctly
by checking if offset_debug still works.
|
|
Make sure we have coverage for empty documents and for large documents
that trigger compact_shared_parent != root for some pages.
|
|
Verify that move doesn't allocate and that it preserves structures
required for tree memory management and append_buffer in tact.
|
|
These just verify that move ctor/assignment operator work as expected in
simple cases - there are a number of ways in which the internal
structure can be incorrect...
|
|
These new tests test that tellg() can fail when being called the second
time, which leads to seekable implementation failing.
|
|
These tests simulate various error conditions when reading data from
streams - seeks failing in seekable streams, underflow throwing an
exception causing read to set badbit, etc.
This change also adjusts memory thresholds to cause a reliable out of
memory during construction of a final buffer for non-seekable streams.
|
|
|
|
This fixes missing coverage in translate_table_generate and
xpath_node_set_raw::append.
|
|
Hiding using namespace in common.hpp is somewhat surprising so remove
common.hpp and move using namespace into all .cpp files that need it.
|
|
Most tests have `using namespace pugi` which makes explicit
qualifications unnecessary.
|
|
These functions were deprecated via comments in 1.5 but never got the
deprecated attribute; now is the time!
Using deprecated functions produces a warning; to silence it, this
change moves the relevant tests to a separate translation unit that has
deprecation disabled.
|
|
This requires moving the list of VS versions out of
autotest-appveyor.ps1 and into appveyor.yml.
|
|
Add memory allocation failure test for concact with a very large list
and make sure we have every single axis covered with and without a
predicate, with and without a previous step.
|
|
Apparently only narrow character streams had out of memory coverage -
fix that and also split this into a separate test.
|
|
Cover both char and wchar_t stream loading in a single run instead of
using pugi::char_t.
|
|
Cover more failure cases and simplify the streambuf implementation a
bit.
|
|
Rename partition to partition3 to resolve conflicts with std::partition.
|
|
Add more memory allocation failure tests.
|
|
Adjust the buffer size to be right on the edge of the overflow, make
sure we actually output " instead of ".
|
|
This test triggers flush() condition for each optimized write() method.
|
|
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.
|
|
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).
|
|
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.
|
|
The script only worked if clang folder was already created.
|
|
This triggers a runtime error under integer sanitizer
|
|
This was triggering an buffer read overflow with asan.
|
|
Make the file executable, fix Windows newlines and fix clang setup.
|
|
Hopefully this will allow for better fuzzing coverage
|
|
Only fuzz the parser for now.
|
|
This downloads a clang build that has support for instrumentation, and also
downloads and compiles libFuzzer.a.
|
|
This allows us to have faster fuzz cycles since the fuzzer is in-process.
|
|
This should make the test fail on a 32-bit target.
|
|
|
|
|
|
Cover empty node case - no XPath query can result in that but it's
possible to create a node set with empty nodes manually.
|
|
|
|
|
|
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.
|
|
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...
|
|
This change adds more thorough tests for attribute conversion as well as
some assorted tests that fix gaps in coverage.
|
|
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.
|
|
Enumerate successfull cases and also cases where the detection stops
half-way and results in a different detected encoding.
|
|
|
|
Add tests for various corner cases of DOM inspection and modification
routines.
|
|
Expand out of memory coverage during XPath parsing and evaluation and
add some other small tests.
|
|
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.
|
|
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.
|