summaryrefslogtreecommitdiff
path: root/tests
AgeCommit message (Collapse)Author
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
2016-01-24test_parse.cpp: add newline to last lineStephan Beyer
This is necessary in order to comply with the C++03 standard.
2016-01-24Fix whitespace issuesStephan Beyer
Git warns when it finds "whitespace errors". This commit gets rid of these whitespace errors for code and adoc files.
2016-01-12tests: Add test for parse_embed_pcdataArseny Kapoulkine
2015-10-25tests: Fix Borland C++ 5.4 compilationArseny Kapoulkine
The tests now compile fine but crash on the first floating-point exception despite our attempts to disable them in main()...
2015-10-17tests: Fix GCC warningArseny Kapoulkine
Fix "this decimal constant is unsigned only in ISO C90".
2015-10-17Fix integer overflow detection with leading zerosArseny Kapoulkine
Since they don't contribute to the resulting value just skip them before parsing. This matches the behavior of strtol/strtoll and results in more intuitive behavior.
2015-10-10tests: Fix version check :)Arseny Kapoulkine
2015-10-09tests: Add a test for empty xpath_query ctorArseny Kapoulkine
2015-10-06tests: Add a copy of header-only testArseny Kapoulkine
This makes sure we get linking errors whenever a symbol is not marked as inline in header-only mode.
2015-09-21Fix parsing of integers that start with +Arseny Kapoulkine
This matches the format strtol supports.
2015-09-20tests: Add tests for integer overflow during conversionArseny Kapoulkine
These tests are only testing attribute as_int in hopes that xml_text uses the same underlying implementation (which it does).
2015-09-19tests: Convert several files to Unix line endingsArseny Kapoulkine
They were still using Windows EOL by mistake