Arseny Kapoulkine
f1d1534210
Fix archive packaging
...
Base directory is now using target basename.
2015-04-10 20:45:07 -07:00
Arseny Kapoulkine
5959a17967
tests: Final test fix for CW
2015-03-21 17:09:42 -07:00
Arseny Kapoulkine
250b690a54
tests: Work around fp issues in various runtime libraries
...
Disable/change some tests for some compilers; use binary float comparison
for early MSVC versions.
2015-03-21 01:05:31 -07:00
Arseny Kapoulkine
ce974094ac
tests: Fix test compilation
...
Rename PAGE_SIZE to page_size to avoid define conflict with Android SDK.
Minor fixes in several tests.
2015-03-21 00:14:53 -07:00
Arseny Kapoulkine
86410cd696
tests: Fix tests in wchar mode
2015-03-18 21:30:30 -07:00
Arseny Kapoulkine
e68048518e
Update version to 1.6
2015-03-18 21:20:40 -07:00
Arseny Kapoulkine
5f996eba6d
Do not emit surrounding whitespace for text nodes
...
Previously we omitted extra whitespace for single PCDATA/CDATA children, but in
mixed content there was extra indentation before/after text nodes.
One of the problems with that is that the text that you saved is not exactly
the same as the parsing result using default flags (parse_trim_pcdata helps).
Another problem is that parse-format cycles do not have a fixed point for mixed
content - the result expands indefinitely. Some XML libraries, like Python
minidom, have the same issue, but this is definitely a problem.
Pretty-printing mixed content is hard. It seems that the only other sensible
choice is to switch mixed content nodes to raw formatting. In a way the code in
this change is a weaker version of that - it removes indentation around text
nodes but still keeps it around element siblings/children.
Thus we can switch to mixed-raw formatting at some point later, which will be
a superset of the current behavior.
To do this we have to either switch at the first text node (.NET XmlDocument
does that), or scan the children of each element for a possible text node and
switch before we output the first child.
The former behavior seems non-intuitive (and a bit broken); unfortunately, the
latter behavior can cost up to 20% of the output time for trees *without* mixed
content.
Fixes #13 .
2015-03-18 09:59:17 -07:00
Arseny Kapoulkine
51da129b50
tests: Fix truncation test
...
data/truncation.xml was corrupted at some point and was not actually valid.
Fix the file and make the test fail if we can't parse truncation.xml at all.
2015-03-13 22:13:10 -07:00
Arseny Kapoulkine
6457f09412
Merge branch 'master' into compact
2015-03-13 08:12:46 -07:00
Arseny Kapoulkine
15fba1debc
tests: Add support for afl-fuzz
...
With the current setup it successfully finds the (fixed) DOCTYPE buffer overrun
in ~50 minutes (on a single core).
2015-03-13 00:18:30 -07:00
Arseny Kapoulkine
0542b1869b
Fix buffer overrun when parsing comments inside DOCTYPE
2015-03-12 20:21:59 -07:00
Arseny Kapoulkine
f81d7cc018
Merge branch 'master' into compact
2015-03-10 20:44:06 -07:00
Arseny Kapoulkine
604861e520
Escape ?> sequence in PI value during printing
...
This prevents malformed PI value from breaking the document structure.
2015-03-10 09:03:22 -07:00
Arseny Kapoulkine
12e137d12f
tests: Move null buffer tests to test_document
...
Remove size=0 test since a better test is already there.
2015-03-05 11:46:34 -08:00
Arseny Kapoulkine
9749920c82
Refactor contents=0 behavior
...
Also change the error code to status_io_error
2015-03-05 11:35:39 -08:00
Arseny Kapoulkine
7ae7344256
Merge branch 'master' of https://github.com/mloy/pugixml into mloy-master
2015-03-05 10:09:54 -08:00
Arseny Kapoulkine
5a848de085
tests: Fix XPath string comparison
...
Also add new tests for translate. These are technically redundant since other
tests would catch the bug with the fixed comparison, but more tests is better.
2015-03-04 10:44:08 -08:00
Arseny Kapoulkine
ee4e2b8669
tests: Implement page heap for OSX/Linux
...
Align allocations to right end of page boundary to catch buffer overruns,
instead of unmapping on deallocations mark the page as no-access to guarantee
a page fault on use-after-free.
2015-03-01 20:57:22 -08:00
Arseny Kapoulkine
7835302297
tests: Fix tests for wchar mode
2015-02-12 08:54:44 -08:00
Arseny Kapoulkine
e94552c9ca
DOCTYPE parsing is now stackless
...
This prevents malformed input XML with very deeply recursive DOCTYPE sections
from crashing the parser.
Fixes #29 .
2015-02-12 08:12:12 -08:00
Arseny Kapoulkine
650a4c6cca
Use string::append in implementations of xml_writer
...
The current code is not optimal; since users actually read samples/tests
change them to use faster (and shorter!) code.
2015-01-24 08:20:42 -08:00
Arseny Kapoulkine
3181a305ed
tests: Fix MSVC 2008 compilation warning
...
Also include math.h to fix issues on some compilers.
2015-01-17 18:40:09 -08:00
Arseny Kapoulkine
617f302808
tests: Use Git instead of Subversion in autotest
2015-01-17 18:39:29 -08:00
Arseny Kapoulkine
e5ecbd63ce
Merge branch 'master' into compact
2015-01-16 21:48:50 -08:00
Arseny Kapoulkine
d454013cff
tests: Add tests for fp roundtrip
...
We test min/max and several different mantissas for the entire exponent range
for both float and double.
It's not clear whether all supported compilers provide an implementation of
sprintf/strtod that supports roundtripping so we may need to disable some of
these tests in the future.
2015-01-16 21:43:28 -08:00
Arseny Kapoulkine
f9ee391233
tests: Add coverage tests for new float setters
...
These only do basic testing to make sure the paths are covered and trivial
values work.
2015-01-16 21:42:35 -08:00
Arseny Kapoulkine
550ab4b635
Merge pull request #27 from sdoiel61/master
...
Make float/double round-trip
This change also adds xml_text::set and xml_attribute::set_value overloads for float so that float is only printed using just enough digits to represent float, instead of enough digits to represent double.
2015-01-16 20:54:58 -08:00
Steve Doiel
cf72c20ca1
Increase precision on large number test
2015-01-16 16:14:59 -08:00
Arseny Kapoulkine
f3e42969a5
Simplify header-only mode usage
...
It's sufficient to define PUGIXML_HEADER_ONLY anywhere now, source is included
automatically.
This is a second attempt; this time it includes a workaround for QMake bug
that caused it to generate incorrect Makefile.
2015-01-09 23:22:57 -08:00
Arseny Kapoulkine
ff16dbdd4c
Don't use off64_t/_wfopen on MinGW32 in C++11 mode
...
Unfortunately, standard headers on MinGW32 insist on undefining off64_t
and _wfopen extensions if __STRICT_ANSI__ is true (e.g. C++11 mode). This
leads to compilation errors since b7a1fec started to use _wfopen in strict
mode. That change erroneously checked GCC version - however, the version
itself is irrelevant; the actual criteria is whether mingw64 runtime is
used.
off64_t is not useful on MinGW32 since we only need it to open large files
on 64-bit platforms; unfortunately, the lack of _wfopen means we won't be
able to support wide-char paths on Windows for MinGW32.
Fixes #24 .
2014-12-13 20:34:10 -08:00
Arseny Kapoulkine
93c3ab4649
Merge branch 'master' into compact
2014-11-27 00:25:16 -08:00
Arseny Kapoulkine
b7a1feccf7
Use _wfopen and fseeko64 on MinGW in C++11 mode
...
Since MinGW 4.5 does not define these functions if __STRICT_ANSI__ is defined
(in case of _wfopen it defines it inconsistently between stdio.h and wchar.h)
use the baseline functions for MinGW 4.5 and earlier.
Fixes #23 .
2014-11-24 20:49:12 -08:00
Arseny Kapoulkine
3e1ae89cf6
tests: Add a test for load_file with wide Unicode name
2014-11-24 18:27:54 -08:00
Arseny Kapoulkine
db8df4a566
Merge branch 'master' into compact
2014-11-20 23:47:16 -08:00
Arseny Kapoulkine
125aa55061
Fix node_declaration copying with empty name
...
node_copy_string relied on the fact that target node had an empty name and
value. Normally this is a safe assumption (and a good one to make since it
makes copying faster), however it was not checked and there was one case when
it did not hold.
Since we're reusing the logic for inserting nodes, newly inserted declaration
nodes had the name set automatically to xml, which in our case violates the
assumption and is counter-productive since we'll override the name right after
setting it.
For now the best solution is to do the same insertion manually - that results
in some code duplication that we can refactor later (same logic is partially
shared by _move variants anyway so on a level duplicating is not that bad).
2014-11-20 23:39:40 -08:00
Arseny Kapoulkine
417048d8cb
tests: Fix tests on various compilers
...
Some compilers don't handle NaNs properly.
Some compilers don't implement fmod in a IEEE-compatible way.
Some compilers have exception handling codegen bugs (DMC...).
2014-11-19 16:34:57 -08:00
Arseny Kapoulkine
3c048bbb5e
tests: Fix version test
2014-11-17 22:45:38 -08:00
Arseny Kapoulkine
e9956ae3a6
Rename xml_document::load to load_string
...
This should completely eliminate the confusion between load and load_file.
Of course, for compatibility reasons we have to preserve the old variant -
it will be deprecated in a future version and subsequently removed.
2014-11-17 19:52:23 -08:00
Arseny Kapoulkine
79ed320f89
tests: Don't use /dev/tty
...
The behavior on OSX is different - we don't get a I/O error so the test is
useless.
2014-11-17 08:35:34 -08:00
Arseny Kapoulkine
c74dc33604
Merge branch 'master' into compact
2014-11-07 21:02:44 +01:00
Arseny Kapoulkine
50bfdb1856
tests: Fix all tests for compact mode
...
Memory allocation behavior is different in compact mode so tests that rely
on current behavior have to be adjusted.
2014-11-06 09:59:07 +01:00
Arseny Kapoulkine
aa1a61c59f
Fix xml_node::offset_debug for corner cases
...
Computed offsets for documents with nodes that were added using append_buffer
or newly appended nodes without name/value information were invalid.
2014-11-05 09:32:52 +01:00
Matthias Loy
1912894f53
:Merge remote-tracking branch 'upstream/master'
2014-11-03 20:23:35 +01:00
Arseny Kapoulkine
97a515f873
tests: Add more XPath mod tests
2014-11-03 07:50:00 +01:00
Arseny Kapoulkine
e9948b4b05
Fix undefined behavior while calling memcpy
...
Calling memcpy(x, 0, 0) is technically undefined (although it should usually
be a no-op).
2014-11-02 09:30:56 +01:00
Arseny Kapoulkine
f68a320a02
tests: Improve test coverage
2014-11-01 11:45:13 +01:00
mloy
837ced350c
load_buffer_impl always checks if buffer is valid pointer and size > 0
...
added some tests to force invalid buffer and size = 0
2014-10-30 14:30:05 +01:00
Arseny Kapoulkine
6229138d80
Optimize node printing by using raw pointers
...
This lets us do fewer null pointer checks (making printing 2% faster with -O3)
and removes a lot of function calls (making printing 20% faster with -O0).
2014-10-27 22:29:14 -07:00
Arseny Kapoulkine
c64d4820b1
XPath: Optimize [position()=expr] and [last()]
...
To get more benefits from constant predicate/filter optimization we rewrite
[position()=expr] predicates into [expr] for numeric expressions. Right now
the rewrite is only for entire expressions - it may be beneficial to split
complex expressions like [position()=constant and expr] into [constant][expr]
but that is more complicated.
last() does not depend on the node set contents so is "constant" as far as
our optimization is concerned so we can evaluate it once.
2014-10-27 18:50:09 -07:00
Arseny Kapoulkine
d5e29292c6
XPath: Optimize constant filters/predicates
...
If a filter/predicate expression is a constant, we don't need to evaluate it
for every nodeset element - we can evaluate it once and pick the right element
or keep/discard the entire collection.
If the expression is 1, we can early out on first node when evaluating the
node set - queries like following::item[1] are now significantly faster.
Additionally this change refactors filters/predicates to have additional
metadata describing the expression type in _test field that is filled during
optimization.
Note that predicate_constant selection right now is very simple (but captures
most common use cases except for maybe [last()]).
2014-10-26 09:37:18 -07:00
Arseny Kapoulkine
f31c14e1fd
tests: Remove git2svn helper script!
2014-10-26 02:22:27 -07:00
Arseny Kapoulkine
0e59ea8234
tests: Add a way for tests to verify allocation failure
...
git-svn-id: https://pugixml.googlecode.com/svn/trunk@1081 99668b35-9821-0410-8761-19e4c4f06640
2014-10-26 03:46:28 +00:00
Arseny Kapoulkine
0b7964917c
Fix node copying for some out of memory cases
...
A page can fail to allocate during attribute creation; this case was not
previously handled.
git-svn-id: https://pugixml.googlecode.com/svn/trunk@1080 99668b35-9821-0410-8761-19e4c4f06640
2014-10-25 16:37:16 +00:00
Arseny Kapoulkine
7b74531c1b
tests: Fix test failure in PUGIXML_WCHAR_MODE
...
git-svn-id: https://pugixml.googlecode.com/svn/trunk@1077 99668b35-9821-0410-8761-19e4c4f06640
2014-10-24 01:37:27 +00:00
Arseny Kapoulkine
546997683a
tests: Add even more coverage tests
...
Also fix MSVC6 compilation (make convertions to function pointers explicit).
git-svn-id: https://pugixml.googlecode.com/svn/trunk@1076 99668b35-9821-0410-8761-19e4c4f06640
2014-10-24 01:17:57 +00:00
Arseny Kapoulkine
903db8682a
tests: Add more tests for better coverage
...
More tests for out-of-memory and other edge conditions
git-svn-id: https://pugixml.googlecode.com/svn/trunk@1075 99668b35-9821-0410-8761-19e4c4f06640
2014-10-23 07:41:07 +00:00
Arseny Kapoulkine
bbd75fda46
tests: Improve test coverage
...
git-svn-id: https://pugixml.googlecode.com/svn/trunk@1074 99668b35-9821-0410-8761-19e4c4f06640
2014-10-23 05:46:44 +00:00
Arseny Kapoulkine
3c92704c19
tests: Fix PUGIXML_WCHAR_MODE compilation
...
git-svn-id: https://pugixml.googlecode.com/svn/trunk@1071 99668b35-9821-0410-8761-19e4c4f06640
2014-10-21 03:38:30 +00:00
Arseny Kapoulkine
7258aea09b
tests: Assert on out-of-memory in tests
...
This should never happen but can improve debugging experience for
work-in-progress changes since that avoids memcpy() into negative memory
space (debugger can't backtrace from failed memcpy since it does not set
up the stack frame).
git-svn-id: https://pugixml.googlecode.com/svn/trunk@1070 99668b35-9821-0410-8761-19e4c4f06640
2014-10-21 03:33:47 +00:00
Arseny Kapoulkine
7774cdd96e
XPath: Make sure step_push is called with valid nodes
...
Some steps relied on step_push rejecting null inputs; this is no longer
the case. Additionally stepping now more rigorously filters null inputs.
git-svn-id: https://pugixml.googlecode.com/svn/trunk@1069 99668b35-9821-0410-8761-19e4c4f06640
2014-10-21 03:33:37 +00:00
Arseny Kapoulkine
45b6315d99
tests: Add a coverage test for unspecified_bool
...
It's unfortunate that we can even do that...
git-svn-id: https://pugixml.googlecode.com/svn/trunk@1068 99668b35-9821-0410-8761-19e4c4f06640
2014-10-20 01:00:56 +00:00
Arseny Kapoulkine
1b8b87904b
XPath: Introduce _first/_any set evaluation modes
...
Sometimes when evaluating the node set we don't need the entire set and
only need the first element in docorder or any element. In the absence of
iterator support we can still use this information to short-circuit
traversals.
This does not have any effect on straightforward node collection queries,
but frequently improves performance of complex queries with predicates
etc. XMark benchmark gets 15x faster with some queries enjoying 100x
speedup on 10 Mb dataset due to a significant complexity improvement.
git-svn-id: https://pugixml.googlecode.com/svn/trunk@1067 99668b35-9821-0410-8761-19e4c4f06640
2014-10-20 01:00:48 +00:00
Arseny Kapoulkine
c3eb9c92a8
XPath: Rename xml_node::select_single_node to ::select_node
...
select_node is shorter and mistyping nodes as node or vice versa should
not lead to any issues since return types are substantially different.
select_single_node method still works and will be deprecated with an
attribute and removed at some point.
git-svn-id: https://pugixml.googlecode.com/svn/trunk@1065 99668b35-9821-0410-8761-19e4c4f06640
2014-10-19 07:33:51 +00:00
Arseny Kapoulkine
f663558875
XPath: Introduce xpath_query::evaluate_node
...
This method is equivalent to xml_node::select_single_node. This makes
select_single_node faster in certain cases by avoiding an allocation and -
more importantly - paves the way for future step optimizations.
git-svn-id: https://pugixml.googlecode.com/svn/trunk@1064 99668b35-9821-0410-8761-19e4c4f06640
2014-10-19 07:33:42 +00:00
Arseny Kapoulkine
72ec01c5f6
XPath: Extend the descendant-or-self optimization
...
Use descendant-or-self::node() transformation for self, descendant and
descendant-or-self axis. Self axis should be semi-frequent; descendant
axes should not really be used with // but if they ever are the complexity
of the step becomes quadratic so it's better to optimize this if possible.
git-svn-id: https://pugixml.googlecode.com/svn/trunk@1063 99668b35-9821-0410-8761-19e4c4f06640
2014-10-18 15:28:02 +00:00
Arseny Kapoulkine
45e0c726f0
tests: Disable tests that rely on ceil() on CLR
...
CLR x64 JIT does not implement ceil() properly (ceil(-0.1) returns
positive zero instead of negative zero). Disable the relevant portions of
tests so that everything else is green...
git-svn-id: https://pugixml.googlecode.com/svn/trunk@1062 99668b35-9821-0410-8761-19e4c4f06640
2014-10-16 06:41:04 +00:00
Arseny Kapoulkine
5da51dff27
XPath: Optimize attribute axis lookup
...
When looking for an attribute by name, finding the first attribute means
we can stop looking since attribute names are unique. This makes some
queries faster by 40%.
Another very common pattern in XPath queries is finding an attribute with
a specified value using a predicate (@name = 'value'). While we perform an
optimal amount of traversal in that case, there is a substantial overhead
with evaluating the nodes, saving and restoring the stack state, pushing
the attribute node into a set, etc. Detecting this pattern allows us to
use optimized code, resulting in up to 2x speedup for some queries.
git-svn-id: https://pugixml.googlecode.com/svn/trunk@1061 99668b35-9821-0410-8761-19e4c4f06640
2014-10-16 03:46:42 +00:00
Arseny Kapoulkine
883031fb45
XPath: Fix optimization bug with //name[last()]
...
The actual condition for the optimization is invariance from context list
-- this includes both position() and last().
Instead of splitting the posinv concept just include last() into
non-posinv expressions - this requires sorting for boolean predicates that
depend on last() and do not depend on position(). These cases should be
very rare.
git-svn-id: https://pugixml.googlecode.com/svn/trunk@1060 99668b35-9821-0410-8761-19e4c4f06640
2014-10-15 06:05:49 +00:00
Arseny Kapoulkine
87d4f03187
tests: Add a test for printing comments that contain --
...
git-svn-id: https://pugixml.googlecode.com/svn/trunk@1059 99668b35-9821-0410-8761-19e4c4f06640
2014-10-14 04:11:26 +00:00
Arseny Kapoulkine
9e6dcc292d
tests: Add XPath sorting test
...
git-svn-id: https://pugixml.googlecode.com/svn/trunk@1054 99668b35-9821-0410-8761-19e4c4f06640
2014-10-05 08:39:44 +00:00
Arseny Kapoulkine
5239fcbd00
XPath: Implement optimized translate()
...
translate() with constant arguments now uses a 128-byte table and a table
lookup instead of searching characters in the source string. The table is
generated during query optimization.
git-svn-id: https://pugixml.googlecode.com/svn/trunk@1052 99668b35-9821-0410-8761-19e4c4f06640
2014-10-05 07:57:58 +00:00
Arseny Kapoulkine
b17501c3fb
tests: Add XPath sorting tests and a simple test for numeric predicates
...
git-svn-id: https://pugixml.googlecode.com/svn/trunk@1051 99668b35-9821-0410-8761-19e4c4f06640
2014-10-05 04:20:52 +00:00
Arseny Kapoulkine
f3b220ca4e
tests: Fix MSVC6 compilation
...
Also fixes PUGIXML_NO_STL compilation and makes it possible to build with
any version of new Windows SDK.
git-svn-id: https://pugixml.googlecode.com/svn/trunk@1044 99668b35-9821-0410-8761-19e4c4f06640
2014-10-03 02:40:11 +00:00
Arseny Kapoulkine
59409f70ef
tests: Add a test for out-of-memory during copy
...
git-svn-id: https://pugixml.googlecode.com/svn/trunk@1040 99668b35-9821-0410-8761-19e4c4f06640
2014-10-02 16:19:55 +00:00
Arseny Kapoulkine
4d39ae9e45
tests: Add a test to verify that xml_document object works with any valid pointer alignment
...
git-svn-id: https://pugixml.googlecode.com/svn/trunk@1039 99668b35-9821-0410-8761-19e4c4f06640
2014-10-02 03:07:08 +00:00
Arseny Kapoulkine
3fcc530b34
tests: Add missing tests to increase code coverage
...
git-svn-id: https://pugixml.googlecode.com/svn/trunk@1038 99668b35-9821-0410-8761-19e4c4f06640
2014-10-02 03:06:59 +00:00
Arseny Kapoulkine
290bf521fa
tests: Add XPath sorting tests for move/append_buffer
...
git-svn-id: https://pugixml.googlecode.com/svn/trunk@1035 99668b35-9821-0410-8761-19e4c4f06640
2014-10-01 07:03:12 +00:00
Arseny Kapoulkine
3ae516abe2
tests: Add tests for copyless copy and related potential bugs
...
git-svn-id: https://pugixml.googlecode.com/svn/trunk@1033 99668b35-9821-0410-8761-19e4c4f06640
2014-10-01 07:02:59 +00:00
Arseny Kapoulkine
0c1a4f40fe
tests: Fix allocator.cpp indentation
...
git-svn-id: https://pugixml.googlecode.com/svn/trunk@1030 99668b35-9821-0410-8761-19e4c4f06640
2014-10-01 07:02:39 +00:00
Arseny Kapoulkine
d519f7a473
tests: Add a test for stackless copy
...
This test has previously caused a stack overflow on x86/MSVC.
git-svn-id: https://pugixml.googlecode.com/svn/trunk@1028 99668b35-9821-0410-8761-19e4c4f06640
2014-09-28 23:23:35 +00:00
Arseny Kapoulkine
5b875e8487
tests: Add one more XPath optimization test
...
git-svn-id: https://pugixml.googlecode.com/svn/trunk@1022 99668b35-9821-0410-8761-19e4c4f06640
2014-09-23 04:40:05 +00:00
Arseny Kapoulkine
89fc7c241c
tests: More XPath tests
...
git-svn-id: https://pugixml.googlecode.com/svn/trunk@1020 99668b35-9821-0410-8761-19e4c4f06640
2014-09-23 04:39:51 +00:00
Arseny Kapoulkine
53550424d9
tests: Fix PUGIXML_WCHAR_MODE build
...
git-svn-id: https://pugixml.googlecode.com/svn/trunk@1017 99668b35-9821-0410-8761-19e4c4f06640
2014-09-21 21:52:24 +00:00
Arseny Kapoulkine
27109cd626
tests: Add test for custom indentation strings
...
git-svn-id: https://pugixml.googlecode.com/svn/trunk@1016 99668b35-9821-0410-8761-19e4c4f06640
2014-09-21 21:52:19 +00:00
Arseny Kapoulkine
3abba14e72
tests: Add a test for stackless write.
...
This test previously caused a stack overflow on x86/MSVC.
git-svn-id: https://pugixml.googlecode.com/svn/trunk@1015 99668b35-9821-0410-8761-19e4c4f06640
2014-09-21 21:52:13 +00:00
Arseny Kapoulkine
fbfe207fe6
tests: Add git-svn reviving script
...
git-svn-id: https://pugixml.googlecode.com/svn/trunk@1010 99668b35-9821-0410-8761-19e4c4f06640
2014-09-12 15:04:20 +00:00
Arseny Kapoulkine
54b68a32b4
tests: Add tests for node movement
...
git-svn-id: https://pugixml.googlecode.com/svn/trunk@1003 99668b35-9821-0410-8761-19e4c4f06640
2014-08-10 23:52:52 +00:00
Arseny Kapoulkine
757c494340
Improve XPath allocator performance
...
When allocating new pages, make sure that the page has at least 1/4 of the
base page size free. This makes sure that we can do small allocations after
big allocations (i.e. huge node lists) without doing a heap alloc.
This is important because XPath stack code always reclaims extra pages after
evaluating sub-expressions, so allocating a small chunk of memory and then
rolling the state back is a common case (filtering a node list using a
predicate usually does this).
A better solution involves smarter allocation rollback strategy, but the
implemented solution is simple and practical.
git-svn-id: https://pugixml.googlecode.com/svn/trunk@999 99668b35-9821-0410-8761-19e4c4f06640
2014-06-01 19:12:36 +00:00
Arseny Kapoulkine
9c5efaa074
tests: Fix Mac OS X compilation.
...
git-svn-id: https://pugixml.googlecode.com/svn/trunk@997 99668b35-9821-0410-8761-19e4c4f06640
2014-04-02 05:29:19 +00:00
Arseny Kapoulkine
e33e1083ad
tests: Fix WinCE compilation
...
git-svn-id: https://pugixml.googlecode.com/svn/trunk@991 99668b35-9821-0410-8761-19e4c4f06640
2014-02-26 22:37:40 +00:00
Arseny Kapoulkine
5a4cedbe91
tests: Add tests for parse_trim_pcdata.
...
git-svn-id: https://pugixml.googlecode.com/svn/trunk@988 99668b35-9821-0410-8761-19e4c4f06640
2014-02-25 03:41:57 +00:00
Arseny Kapoulkine
cbd8131d09
Fix clang build.
...
git-svn-id: https://pugixml.googlecode.com/svn/trunk@986 99668b35-9821-0410-8761-19e4c4f06640
2014-02-23 19:38:24 +00:00
Arseny Kapoulkine
934bddcfa6
Fix gap collapsing during PCDATA parsing for fragment mode.
...
git-svn-id: https://pugixml.googlecode.com/svn/trunk@985 99668b35-9821-0410-8761-19e4c4f06640
2014-02-23 19:28:27 +00:00
Arseny Kapoulkine
bd960159dd
tests: Write temporary files to executable folder.
...
Temp folder is the root folder on Windows; writing to the folder may require administrator rights.
We can't use current folder for temporaries because tests from different configurations can be running
in parallel, but executable folder is always safe since we only run each executable once.
git-svn-id: https://pugixml.googlecode.com/svn/trunk@984 99668b35-9821-0410-8761-19e4c4f06640
2014-02-19 06:21:51 +00:00
Arseny Kapoulkine
284f56f588
Add MSVC 12 (2013) to autotest list
...
git-svn-id: https://pugixml.googlecode.com/svn/trunk@982 99668b35-9821-0410-8761-19e4c4f06640
2014-02-12 04:38:54 +00:00
Arseny Kapoulkine
47c15ad949
Implement document fragment parsing.
...
Introduce a notable behavior change in default parsing mode: documents without a
document element node are now considered invalid. This is technically a breaking change,
however the amount of documents it affects is very small, all parsed data still persists,
and lack of this check results in very confusing behavior in a number of cases.
In order to be able to parse documents without an element node, a fragment parsing flag is
introduced.
Parsing a buffer in fragment mode treats the buffer as a fragment of a valid XML.
As a consequence, top-level PCDATA is added to the tree; additionally, there are no
restrictions on the number of nodes -- so documents without a document element are considered
valid.
Due to the way parsing works internally, load_buffer_inplace occasionally can not preserve
the document contents if it's parsed in a fragment mode. While unfortunate, this problem is
fundamental; since the use case is relatively obscure, hopefully documenting this shortcoming
will be enough.
git-svn-id: https://pugixml.googlecode.com/svn/trunk@980 99668b35-9821-0410-8761-19e4c4f06640
2014-02-11 06:45:27 +00:00
Arseny Kapoulkine
5fa25a878a
Fix bogus Clang 3.4 warning
...
git-svn-id: https://pugixml.googlecode.com/svn/trunk@979 99668b35-9821-0410-8761-19e4c4f06640
2014-02-11 04:55:36 +00:00
Arseny Kapoulkine
f5a5f49802
Fix clang build.
...
git-svn-id: https://pugixml.googlecode.com/svn/trunk@978 99668b35-9821-0410-8761-19e4c4f06640
2014-02-10 17:04:17 +00:00
Arseny Kapoulkine
79fb68ac41
Use a null-terminated buffer for parsing as often as possible.
...
Parsing used to work on a non null-terminated buffer, inserting a fake null terminator to increase performance.
This makes it impossible to implement fragment parsing that preserves PCDATA contents (as witnessed by some
tests for boundary conditions that actually depended on this behavior).
Since almost all uses result in us allocating an internal buffer anyway, the new policy is to make sure all buffers
that are allocated by pugixml are null-terminated - the only exception now is external calls to load_buffer_inplace
that don't trigger encoding conversion.
git-svn-id: https://pugixml.googlecode.com/svn/trunk@977 99668b35-9821-0410-8761-19e4c4f06640
2014-02-10 16:57:04 +00:00
Arseny Kapoulkine
9ba26b94c7
Replace memory-management functions before every test.
...
In case a test sets memory-management functions to perform custom testing and fails midway,
all subsequent tests that rely on custom memory handling (i.e. threshold) can fail unexpectedly.
Setting up the functions before every test fixes this, making all tests self-contained.
git-svn-id: https://pugixml.googlecode.com/svn/trunk@976 99668b35-9821-0410-8761-19e4c4f06640
2014-02-10 16:56:55 +00:00
Arseny Kapoulkine
acf9dee0dd
Update PUGIXML_VERSION define
...
git-svn-id: https://pugixml.googlecode.com/svn/trunk@973 99668b35-9821-0410-8761-19e4c4f06640
2014-02-10 05:11:05 +00:00
Arseny Kapoulkine
543fa8268d
Add Makefile for building and running tests.
...
This expands and replaces the Travis-specific makefile by adding more options and correctly tracking header dependencies.
Also add wchar_t mode test to Travis configuration.
git-svn-id: http://pugixml.googlecode.com/svn/trunk@971 99668b35-9821-0410-8761-19e4c4f06640
2014-02-09 21:56:30 +00:00
Arseny Kapoulkine
09647e2b29
Add scripts for Travis CI
...
git-svn-id: http://pugixml.googlecode.com/svn/trunk@969 99668b35-9821-0410-8761-19e4c4f06640
2014-02-09 00:05:19 +00:00
Arseny Kapoulkine
0557a06764
Fix test suite stringizing macros to be C++11-compliant
...
git-svn-id: http://pugixml.googlecode.com/svn/trunk@963 99668b35-9821-0410-8761-19e4c4f06640
2014-02-08 20:39:25 +00:00
Arseny Kapoulkine
f9bbc39bd9
Implement long long support if PUGIXML_HAS_LONG_LONG is defined (autodetection is not implemented yet)
...
git-svn-id: http://pugixml.googlecode.com/svn/trunk@962 99668b35-9821-0410-8761-19e4c4f06640
2014-02-08 20:36:09 +00:00
Arseny Kapoulkine
0938714fa0
Change xml_named_node_iterator to be bidirectional and to match xml_node_iterator in terms of internals
...
git-svn-id: http://pugixml.googlecode.com/svn/trunk@960 99668b35-9821-0410-8761-19e4c4f06640
2014-01-27 03:54:05 +00:00
Arseny Kapoulkine
7f6b062e9f
Implement automatic hexadecimal decoding for xml_attribute::as_int and xml_text::as_int. This is effectively a form of strtol with base 0, but without octal support.
...
git-svn-id: http://pugixml.googlecode.com/svn/trunk@958 99668b35-9821-0410-8761-19e4c4f06640
2014-01-15 04:28:10 +00:00
arseny.kapoulkine@gmail.com
cac6b8720a
Make sure newlines are consistent for both .zip and .tar.gz archives
...
git-svn-id: http://pugixml.googlecode.com/svn/trunk@953 99668b35-9821-0410-8761-19e4c4f06640
2013-07-20 05:55:22 +00:00
arseny.kapoulkine@gmail.com
4e1add1a46
Fix invalid assertion in XPath: reallocation can result in allocating buffer of the same size due to pointer-sized alignment
...
git-svn-id: http://pugixml.googlecode.com/svn/trunk@946 99668b35-9821-0410-8761-19e4c4f06640
2013-03-20 02:44:05 +00:00
arseny.kapoulkine@gmail.com
9b9a414ab6
Compatibility fixes (fixed warnings in gcc, msvc7, fixed errors in bcc, cw, msvc6)
...
git-svn-id: http://pugixml.googlecode.com/svn/trunk@939 99668b35-9821-0410-8761-19e4c4f06640
2012-12-07 06:35:53 +00:00
arseny.kapoulkine@gmail.com
00d4994f24
tests: Added append_buffer tests
...
git-svn-id: http://pugixml.googlecode.com/svn/trunk@937 99668b35-9821-0410-8761-19e4c4f06640
2012-12-07 04:49:51 +00:00
arseny.kapoulkine@gmail.com
efc634a718
archive.pl now creates a wrapping folder in both .tar.gz and .zip archives
...
git-svn-id: http://pugixml.googlecode.com/svn/trunk@935 99668b35-9821-0410-8761-19e4c4f06640
2012-11-20 05:34:06 +00:00
arseny.kapoulkine@gmail.com
cee7eca229
XPath: Fix unit test that (incorrectly) relied on right-associativity of union operator to trigger out of memory condition
...
git-svn-id: http://pugixml.googlecode.com/svn/trunk@930 99668b35-9821-0410-8761-19e4c4f06640
2012-11-17 23:51:43 +00:00
arseny.kapoulkine@gmail.com
48f9343c05
XPath: Add unit test for unary minus and union precedences
...
git-svn-id: http://pugixml.googlecode.com/svn/trunk@929 99668b35-9821-0410-8761-19e4c4f06640
2012-11-17 22:50:05 +00:00
arseny.kapoulkine@gmail.com
68d533a828
tests: Remove 'con' loading from tests since it stopped working under Windows 8...
...
git-svn-id: http://pugixml.googlecode.com/svn/trunk@921 99668b35-9821-0410-8761-19e4c4f06640
2012-10-31 04:45:38 +00:00
arseny.kapoulkine@gmail.com
2876af6773
Fix find_child_by_attribute assertion for attributes with null name/value.
...
git-svn-id: http://pugixml.googlecode.com/svn/trunk@920 99668b35-9821-0410-8761-19e4c4f06640
2012-09-29 06:36:29 +00:00
arseny.kapoulkine@gmail.com
4a2d398a07
tests: Fixed PUGIXML_NO_STL compilation
...
git-svn-id: http://pugixml.googlecode.com/svn/trunk@898 99668b35-9821-0410-8761-19e4c4f06640
2012-04-04 02:01:22 +00:00
arseny.kapoulkine@gmail.com
bda8e935e9
Updated version number and copyright year everywhere
...
git-svn-id: http://pugixml.googlecode.com/svn/trunk@897 99668b35-9821-0410-8761-19e4c4f06640
2012-04-03 05:04:07 +00:00
arseny.kapoulkine@gmail.com
a47bd44953
tests: Added tests for as_string and default values in as_*
...
git-svn-id: http://pugixml.googlecode.com/svn/trunk@894 99668b35-9821-0410-8761-19e4c4f06640
2012-04-03 04:44:54 +00:00
arseny.kapoulkine@gmail.com
f4ac43c549
tests: Added xml_named_node_iterator tests
...
git-svn-id: http://pugixml.googlecode.com/svn/trunk@892 99668b35-9821-0410-8761-19e4c4f06640
2012-03-27 05:46:44 +00:00
arseny.kapoulkine@gmail.com
1cd736905b
tests: Added text/binary save_file tests
...
git-svn-id: http://pugixml.googlecode.com/svn/trunk@884 99668b35-9821-0410-8761-19e4c4f06640
2012-03-23 05:38:08 +00:00
arseny.kapoulkine@gmail.com
9269e24a4b
tests: Added tests for xml_text mutation operations
...
git-svn-id: http://pugixml.googlecode.com/svn/trunk@877 99668b35-9821-0410-8761-19e4c4f06640
2012-03-23 03:40:30 +00:00
arseny.kapoulkine@gmail.com
0237fb466e
tests: Added tests for read-only xml_text operations
...
git-svn-id: http://pugixml.googlecode.com/svn/trunk@875 99668b35-9821-0410-8761-19e4c4f06640
2012-03-23 03:25:03 +00:00
arseny.kapoulkine@gmail.com
742a1db2df
tests: Added new test for string/istream include interaction (this actually fails on DMC)
...
git-svn-id: http://pugixml.googlecode.com/svn/trunk@865 99668b35-9821-0410-8761-19e4c4f06640
2012-03-20 05:05:35 +00:00
arseny.kapoulkine@gmail.com
35ea9a6088
tests: Added tests for constant iterator objects
...
git-svn-id: http://pugixml.googlecode.com/svn/trunk@859 99668b35-9821-0410-8761-19e4c4f06640
2012-03-14 05:34:29 +00:00
arseny.kapoulkine@gmail.com
ca8d43ba03
tests: Added MSVC11 variants to test suite
...
git-svn-id: http://pugixml.googlecode.com/svn/trunk@851 99668b35-9821-0410-8761-19e4c4f06640
2012-03-07 05:59:09 +00:00
arseny.kapoulkine@gmail.com
199b97a851
tests: Miscellaneous fixes
...
git-svn-id: http://pugixml.googlecode.com/svn/trunk@850 99668b35-9821-0410-8761-19e4c4f06640
2012-03-06 16:56:45 +00:00
arseny.kapoulkine@gmail.com
8b8cf7977c
tests: Added Android to testing (STLport variant is only tested without exceptions because of library issues)
...
git-svn-id: http://pugixml.googlecode.com/svn/trunk@848 99668b35-9821-0410-8761-19e4c4f06640
2012-03-06 09:14:04 +00:00
arseny.kapoulkine@gmail.com
04629118db
tests: Android compilation fixes
...
git-svn-id: http://pugixml.googlecode.com/svn/trunk@846 99668b35-9821-0410-8761-19e4c4f06640
2012-03-06 08:49:58 +00:00
arseny.kapoulkine@gmail.com
72dd6038a2
tests: Added BlackBerry NDK to test suite
...
git-svn-id: http://pugixml.googlecode.com/svn/trunk@845 99668b35-9821-0410-8761-19e4c4f06640
2012-03-06 07:13:25 +00:00
arseny.kapoulkine@gmail.com
f6c8613229
tests: Use mkstemp on Unix and QNX (BlackBerry) to avoid tmpnam deprecation warning
...
git-svn-id: http://pugixml.googlecode.com/svn/trunk@843 99668b35-9821-0410-8761-19e4c4f06640
2012-03-06 07:03:09 +00:00
arseny.kapoulkine@gmail.com
eaac540dd2
tests: Added BadaSDK to tests, changed report coloring to mark cells that compiled successfully but skipped execution
...
git-svn-id: http://pugixml.googlecode.com/svn/trunk@841 99668b35-9821-0410-8761-19e4c4f06640
2012-03-06 06:37:54 +00:00
arseny.kapoulkine@gmail.com
fdc03d39ab
tests: Fixed compilation errors for BadaSDK
...
git-svn-id: http://pugixml.googlecode.com/svn/trunk@839 99668b35-9821-0410-8761-19e4c4f06640
2012-03-06 06:13:10 +00:00
arseny.kapoulkine@gmail.com
76ef04129d
tests: Added WinCE to autotest
...
git-svn-id: http://pugixml.googlecode.com/svn/trunk@836 99668b35-9821-0410-8761-19e4c4f06640
2012-02-19 09:06:24 +00:00
arseny.kapoulkine@gmail.com
9133322c4c
tests: Minor fixes for WinCE compilation
...
git-svn-id: http://pugixml.googlecode.com/svn/trunk@834 99668b35-9821-0410-8761-19e4c4f06640
2012-02-19 09:05:23 +00:00
arseny.kapoulkine@gmail.com
1835571886
tests: Add an explicit test for empty xpath_node_set copying (regression test for issue 143)
...
git-svn-id: http://pugixml.googlecode.com/svn/trunk@832 99668b35-9821-0410-8761-19e4c4f06640
2012-02-18 03:35:37 +00:00
arseny.kapoulkine
0d4020e96e
tests: Added version test
...
git-svn-id: http://pugixml.googlecode.com/svn/trunk@831 99668b35-9821-0410-8761-19e4c4f06640
2011-12-20 10:34:37 +00:00
arseny.kapoulkine
a0769dfe38
Introduced encoding_latin1 support (conversion on loading, conversion on saving, encoding name in declaration in document::save)
...
git-svn-id: http://pugixml.googlecode.com/svn/trunk@829 99668b35-9821-0410-8761-19e4c4f06640
2011-12-20 09:45:10 +00:00
arseny.kapoulkine
1b87d3dcbf
Introduced parse_ws_pcdata_single flag: only parses whitespace-only PCDATA if it's the only child of the parent node (middle ground between default flags and parse_ws_pcdata)
...
git-svn-id: http://pugixml.googlecode.com/svn/trunk@825 99668b35-9821-0410-8761-19e4c4f06640
2011-12-09 05:24:07 +00:00
arseny.kapoulkine
7757503d72
Added format_no_escapes flag
...
git-svn-id: http://pugixml.googlecode.com/svn/trunk@819 99668b35-9821-0410-8761-19e4c4f06640
2011-09-10 03:05:29 +00:00
arseny.kapoulkine
8a5144a927
Fixed unspecified bool conversion for MSVC CLR for the case when pugixml is compiled as unmanaged and calling code is compiled as managed. Fixes issue 121.
...
git-svn-id: http://pugixml.googlecode.com/svn/trunk@817 99668b35-9821-0410-8761-19e4c4f06640
2011-08-19 04:25:13 +00:00
arseny.kapoulkine
1d6db79bd9
tests: Updated autotest-linux.sh for Fedora
...
git-svn-id: http://pugixml.googlecode.com/svn/trunk@816 99668b35-9821-0410-8761-19e4c4f06640
2011-07-27 07:40:38 +00:00
arseny.kapoulkine
4d605eb865
tests: Disabled VM shutdown/startup overlap to decrease peak memory consumption
...
git-svn-id: http://pugixml.googlecode.com/svn/trunk@814 99668b35-9821-0410-8761-19e4c4f06640
2011-07-24 06:19:57 +00:00
arseny.kapoulkine
39e6b2701d
tests: Added tests for non-seekable streams
...
git-svn-id: http://pugixml.googlecode.com/svn/trunk@810 99668b35-9821-0410-8761-19e4c4f06640
2011-07-19 15:20:39 +00:00
arseny.kapoulkine
5f318e056e
tests: Fixed C++/CLI compilation warning
...
git-svn-id: http://pugixml.googlecode.com/svn/trunk@807 99668b35-9821-0410-8761-19e4c4f06640
2011-02-16 20:00:54 +00:00
arseny.kapoulkine
5f4ecb9ec3
tests: Added C++/CLI support
...
git-svn-id: http://pugixml.googlecode.com/svn/trunk@805 99668b35-9821-0410-8761-19e4c4f06640
2011-02-16 20:00:08 +00:00
arseny.kapoulkine
d99745be21
Enabled many additional GCC warnings (most notably -Wshadow and -Wold-style-cast), fixed the code accordingly
...
git-svn-id: http://pugixml.googlecode.com/svn/trunk@800 99668b35-9821-0410-8761-19e4c4f06640
2010-12-19 10:16:37 +00:00
arseny.kapoulkine
0a96b552d6
tests: Added document reset-self test
...
git-svn-id: http://pugixml.googlecode.com/svn/trunk@787 99668b35-9821-0410-8761-19e4c4f06640
2010-10-31 07:37:37 +00:00
arseny.kapoulkine
4920e4fec9
Added xml_document::reset() function with document parameter
...
git-svn-id: http://pugixml.googlecode.com/svn/trunk@786 99668b35-9821-0410-8761-19e4c4f06640
2010-10-31 07:33:01 +00:00
arseny.kapoulkine
09b5dfdcb0
Added xml_document::reset, added append/prepend/insert child overloads for elements (with explicit name)
...
git-svn-id: http://pugixml.googlecode.com/svn/trunk@779 99668b35-9821-0410-8761-19e4c4f06640
2010-10-26 17:09:34 +00:00
arseny.kapoulkine
e3bbc9c40e
tests: Fixed WCHAR mode compilation
...
git-svn-id: http://pugixml.googlecode.com/svn/trunk@774 99668b35-9821-0410-8761-19e4c4f06640
2010-10-22 19:01:50 +00:00
arseny.kapoulkine
6bc4357567
tests: Fixed CW compilation
...
git-svn-id: http://pugixml.googlecode.com/svn/trunk@773 99668b35-9821-0410-8761-19e4c4f06640
2010-10-22 04:28:52 +00:00
arseny.kapoulkine
a18385e1e0
If an element node has the only child, and it is of CDATA type, then the extra indentation is omitted (previously this behavior only held for PCDATA children)
...
git-svn-id: http://pugixml.googlecode.com/svn/trunk@770 99668b35-9821-0410-8761-19e4c4f06640
2010-10-19 15:38:10 +00:00
arseny.kapoulkine@gmail.com
b979d4c2bd
Added prepend_attribute, prepend_child and prepend_copy functions
...
git-svn-id: http://pugixml.googlecode.com/svn/trunk@769 99668b35-9821-0410-8761-19e4c4f06640
2010-10-19 14:29:02 +00:00
arseny.kapoulkine
d8c19b201f
Added xml_document::document_element function
...
git-svn-id: http://pugixml.googlecode.com/svn/trunk@768 99668b35-9821-0410-8761-19e4c4f06640
2010-10-18 18:27:13 +00:00
arseny.kapoulkine
498947c718
Fixed internal_object() const-correctness, added xml_node::hash_value and xml_attribute::hash_value functions
...
git-svn-id: http://pugixml.googlecode.com/svn/trunk@767 99668b35-9821-0410-8761-19e4c4f06640
2010-10-18 16:59:31 +00:00
arseny.kapoulkine
a32b4392bb
XPath: evaluate_string now guarantees zero-terminated result (unless the buffer size is zero)
...
git-svn-id: http://pugixml.googlecode.com/svn/trunk@762 99668b35-9821-0410-8761-19e4c4f06640
2010-10-03 18:14:12 +00:00
arseny.kapoulkine
f725ff1170
tests: Fixed XPath OOM tests, added parsing exception test
...
git-svn-id: http://pugixml.googlecode.com/svn/trunk@760 99668b35-9821-0410-8761-19e4c4f06640
2010-10-03 14:28:18 +00:00
arseny.kapoulkine
630be2edb3
tests: Added node_doctype and parse_doctype tests
...
git-svn-id: http://pugixml.googlecode.com/svn/trunk@757 99668b35-9821-0410-8761-19e4c4f06640
2010-09-26 19:01:36 +00:00
arseny.kapoulkine
a590a69bda
Minor UTF8 conversion refactoring, added as_utf8 and as_wide overloads with string arguments
...
git-svn-id: http://pugixml.googlecode.com/svn/trunk@749 99668b35-9821-0410-8761-19e4c4f06640
2010-09-22 19:05:31 +00:00
arseny.kapoulkine
ac31030886
tests: Removed document_order test, added internal_object test
...
git-svn-id: http://pugixml.googlecode.com/svn/trunk@748 99668b35-9821-0410-8761-19e4c4f06640
2010-09-22 18:31:16 +00:00
arseny.kapoulkine
70d88da727
Major header cleanup: removed redundant comments (single-line function/type descriptions are left for convenience), removed parse()/as_utf16(), removed deprecated function tests
...
git-svn-id: http://pugixml.googlecode.com/svn/trunk@746 99668b35-9821-0410-8761-19e4c4f06640
2010-09-21 19:30:03 +00:00
arseny.kapoulkine
b84eb7bdba
tests: Added load_file/save_file tests
...
git-svn-id: http://pugixml.googlecode.com/svn/trunk@742 99668b35-9821-0410-8761-19e4c4f06640
2010-09-20 20:14:38 +00:00
arseny.kapoulkine
7f3e74b543
tests: Improved tests for parsing result default construction
...
git-svn-id: http://pugixml.googlecode.com/svn/trunk@739 99668b35-9821-0410-8761-19e4c4f06640
2010-09-20 19:07:11 +00:00
arseny.kapoulkine
d35f6751cf
tests: Added default ctor test
...
git-svn-id: http://pugixml.googlecode.com/svn/trunk@737 99668b35-9821-0410-8761-19e4c4f06640
2010-09-20 18:14:58 +00:00
arseny.kapoulkine
d6d6876da7
tests: Fixed MSVC 6/7 compilation error
...
git-svn-id: http://pugixml.googlecode.com/svn/trunk@731 99668b35-9821-0410-8761-19e4c4f06640
2010-09-14 07:09:17 +00:00
arseny.kapoulkine
91f097d34d
tests: Improved XPath sort coverage
...
git-svn-id: http://pugixml.googlecode.com/svn/trunk@730 99668b35-9821-0410-8761-19e4c4f06640
2010-09-14 05:43:13 +00:00
arseny.kapoulkine
521384bd21
tests: Added XPath out of memory tests
...
git-svn-id: http://pugixml.googlecode.com/svn/trunk@728 99668b35-9821-0410-8761-19e4c4f06640
2010-09-14 05:29:16 +00:00
arseny.kapoulkine
72bc1f0807
tests: Fixed wchar mode tests
...
git-svn-id: http://pugixml.googlecode.com/svn/trunk@723 99668b35-9821-0410-8761-19e4c4f06640
2010-09-13 18:58:42 +00:00
arseny.kapoulkine
7709a32b09
tests: Added XPath test for large node sets
...
git-svn-id: http://pugixml.googlecode.com/svn/trunk@721 99668b35-9821-0410-8761-19e4c4f06640
2010-09-13 18:33:47 +00:00
arseny.kapoulkine
cae6c066b7
XPath: Minor lang() fix (use ASCII lowercase because language names are ASCII-only anyway)
...
git-svn-id: http://pugixml.googlecode.com/svn/trunk@716 99668b35-9821-0410-8761-19e4c4f06640
2010-09-11 13:30:49 +00:00
arseny.kapoulkine
9a6549e802
tests: Minor report fix
...
git-svn-id: http://pugixml.googlecode.com/svn/trunk@713 99668b35-9821-0410-8761-19e4c4f06640
2010-09-01 17:00:52 +00:00
arseny.kapoulkine
0e4278ad3c
tests: Added automatic CPU count detection
...
git-svn-id: http://pugixml.googlecode.com/svn/trunk@712 99668b35-9821-0410-8761-19e4c4f06640
2010-08-31 19:01:27 +00:00
arseny.kapoulkine
cec7bfb54d
tests: Custom allocations now use memory from Win32 heap instead of CRT heap
...
git-svn-id: http://pugixml.googlecode.com/svn/trunk@711 99668b35-9821-0410-8761-19e4c4f06640
2010-08-30 18:30:39 +00:00
arseny.kapoulkine
42f36f1a7d
tests: Minor fix for MinGW 3.4
...
git-svn-id: http://pugixml.googlecode.com/svn/trunk@709 99668b35-9821-0410-8761-19e4c4f06640
2010-08-30 05:01:19 +00:00
arseny.kapoulkine
a0a28b1c05
tests: Fixed test warnings for MSVC10, slightly extended substring tests
...
git-svn-id: http://pugixml.googlecode.com/svn/trunk@707 99668b35-9821-0410-8761-19e4c4f06640
2010-08-29 20:57:42 +00:00
arseny.kapoulkine
529762d46b
tests: Adjusted autotest report formatter for increased configuration count
...
git-svn-id: http://pugixml.googlecode.com/svn/trunk@705 99668b35-9821-0410-8761-19e4c4f06640
2010-08-29 19:04:20 +00:00
arseny.kapoulkine
954de8f89a
tests: Various compilation fixes for BCC and MSVC6
...
git-svn-id: http://pugixml.googlecode.com/svn/trunk@702 99668b35-9821-0410-8761-19e4c4f06640
2010-08-29 16:28:10 +00:00
arseny.kapoulkine
9a0464bdc2
tests: Fixed XPath substring tests
...
git-svn-id: http://pugixml.googlecode.com/svn/trunk@700 99668b35-9821-0410-8761-19e4c4f06640
2010-08-29 15:53:34 +00:00
arseny.kapoulkine
06e9af0ecb
tests: Improved document order comparison coverage
...
git-svn-id: http://pugixml.googlecode.com/svn/trunk@696 99668b35-9821-0410-8761-19e4c4f06640
2010-08-29 15:51:35 +00:00
arseny.kapoulkine
31b8e28997
tests: Improved document_order() coverage
...
git-svn-id: http://pugixml.googlecode.com/svn/trunk@693 99668b35-9821-0410-8761-19e4c4f06640
2010-08-29 15:49:35 +00:00
arseny.kapoulkine
998a534df7
tests: Changed XPath checking macros to avoid query copying under GCC
...
git-svn-id: http://pugixml.googlecode.com/svn/trunk@692 99668b35-9821-0410-8761-19e4c4f06640
2010-08-29 15:49:06 +00:00
arseny.kapoulkine
6d44879c5a
tests: Minor fixes
...
git-svn-id: http://pugixml.googlecode.com/svn/trunk@691 99668b35-9821-0410-8761-19e4c4f06640
2010-08-29 15:48:05 +00:00
arseny.kapoulkine
0dd0b4c496
tests: Introduced fullcoverage mode
...
git-svn-id: http://pugixml.googlecode.com/svn/trunk@688 99668b35-9821-0410-8761-19e4c4f06640
2010-08-29 15:46:30 +00:00
arseny.kapoulkine
0868f83deb
tests: Removed some deprecated tests, minor coverage improvements
...
git-svn-id: http://pugixml.googlecode.com/svn/trunk@687 99668b35-9821-0410-8761-19e4c4f06640
2010-08-29 15:45:36 +00:00
arseny.kapoulkine
771c8ecc2f
tests: Added more XPath tests
...
git-svn-id: http://pugixml.googlecode.com/svn/trunk@683 99668b35-9821-0410-8761-19e4c4f06640
2010-08-29 15:41:16 +00:00
arseny.kapoulkine
61ceb10baf
tests: Added more XPath variable tests
...
git-svn-id: http://pugixml.googlecode.com/svn/trunk@681 99668b35-9821-0410-8761-19e4c4f06640
2010-08-29 15:39:43 +00:00
arseny.kapoulkine
f481f038d6
tests: Added XPath variable and variable set tests
...
git-svn-id: http://pugixml.googlecode.com/svn/trunk@679 99668b35-9821-0410-8761-19e4c4f06640
2010-08-29 15:37:29 +00:00
arseny.kapoulkine
5442ff6aba
tests: Fixed coverage reports
...
git-svn-id: http://pugixml.googlecode.com/svn/trunk@675 99668b35-9821-0410-8761-19e4c4f06640
2010-08-29 15:34:10 +00:00
arseny.kapoulkine
fd6b419b2a
Removed deprecated wildcard functions, removed deprecated all_elements_by_name
...
git-svn-id: http://pugixml.googlecode.com/svn/trunk@669 99668b35-9821-0410-8761-19e4c4f06640
2010-08-29 15:31:03 +00:00
arseny.kapoulkine
84dce2eb46
tests: Remove new/delete overrides (all pugi code now uses custom allocators)
...
git-svn-id: http://pugixml.googlecode.com/svn/trunk@668 99668b35-9821-0410-8761-19e4c4f06640
2010-08-29 15:30:14 +00:00
arseny.kapoulkine
80cbba6ec5
tests: Removed NO_XPATH-related define restrictions, autotest-local can be launched with custom toolset list now
...
git-svn-id: http://pugixml.googlecode.com/svn/trunk@665 99668b35-9821-0410-8761-19e4c4f06640
2010-08-29 15:28:23 +00:00
arseny.kapoulkine
e08c065820
tests: Added XPath tests for attribute context
...
git-svn-id: http://pugixml.googlecode.com/svn/trunk@664 99668b35-9821-0410-8761-19e4c4f06640
2010-08-29 15:27:51 +00:00
arseny.kapoulkine
7fab1bf757
tests: Reduced allocation count
...
git-svn-id: http://pugixml.googlecode.com/svn/trunk@662 99668b35-9821-0410-8761-19e4c4f06640
2010-08-29 15:26:06 +00:00
arseny.kapoulkine
049fa3906d
tests: Added new evaluate_string tests, fixed tests for NO_STL mode
...
git-svn-id: http://pugixml.googlecode.com/svn/trunk@661 99668b35-9821-0410-8761-19e4c4f06640
2010-08-29 15:25:05 +00:00
arseny.kapoulkine
ea0dbe7884
tests: Deallocation of null pointer is illegal for custom allocators
...
git-svn-id: http://pugixml.googlecode.com/svn/trunk@656 99668b35-9821-0410-8761-19e4c4f06640
2010-08-29 15:20:27 +00:00
arseny.kapoulkine
40e6900b0f
tests: Added more string allocation tests
...
git-svn-id: http://pugixml.googlecode.com/svn/trunk@652 99668b35-9821-0410-8761-19e4c4f06640
2010-08-29 15:17:30 +00:00
arseny.kapoulkine
1f74bf1edc
XPath: Correct out of memory handling for string to number conversion during parsing, added corresponding test
...
git-svn-id: http://pugixml.googlecode.com/svn/trunk@651 99668b35-9821-0410-8761-19e4c4f06640
2010-08-29 15:16:55 +00:00
arseny.kapoulkine
7aadde4229
tests: Added XPath out of memory parse test
...
git-svn-id: http://pugixml.googlecode.com/svn/trunk@648 99668b35-9821-0410-8761-19e4c4f06640
2010-08-29 15:14:48 +00:00
arseny.kapoulkine
6154125dce
tests: Removed redundant includes
...
git-svn-id: http://pugixml.googlecode.com/svn/trunk@642 99668b35-9821-0410-8761-19e4c4f06640
2010-08-29 15:11:00 +00:00
arseny.kapoulkine
608d5bbd79
XPath: Added error offset reporting
...
git-svn-id: http://pugixml.googlecode.com/svn/trunk@639 99668b35-9821-0410-8761-19e4c4f06640
2010-08-29 15:08:33 +00:00
arseny.kapoulkine
12607d6047
tests: Extended XPath tests
...
git-svn-id: http://pugixml.googlecode.com/svn/trunk@638 99668b35-9821-0410-8761-19e4c4f06640
2010-08-29 15:07:18 +00:00
arseny.kapoulkine
9292096c56
tests: Added support for XPath without exceptions
...
git-svn-id: http://pugixml.googlecode.com/svn/trunk@637 99668b35-9821-0410-8761-19e4c4f06640
2010-08-29 15:05:50 +00:00
arseny.kapoulkine
8d39e54f49
tests: Added tests for short buffers (they duplicate the progressive truncation test, but it's better to have explicit tests)
...
git-svn-id: http://pugixml.googlecode.com/svn/trunk@632 99668b35-9821-0410-8761-19e4c4f06640
2010-08-09 11:24:26 +00:00
arseny.kapoulkine
a9bc2d8873
tests: Fixed tests for wchar_t mode, added dummy std::cout/wcout usage for MSVC in order to create locales beforehand (avoids memory leaks during tests), minor additional test fixes
...
git-svn-id: http://pugixml.googlecode.com/svn/trunk@629 99668b35-9821-0410-8761-19e4c4f06640
2010-08-04 20:10:10 +00:00
arseny.kapoulkine
deb9e8bc74
tests: Added more XPath tests
...
git-svn-id: http://pugixml.googlecode.com/svn/trunk@628 99668b35-9821-0410-8761-19e4c4f06640
2010-08-04 14:15:46 +00:00
arseny.kapoulkine
6df3609007
tests: Added even more tests for better code coverage
...
git-svn-id: http://pugixml.googlecode.com/svn/trunk@627 99668b35-9821-0410-8761-19e4c4f06640
2010-08-04 13:07:35 +00:00
arseny.kapoulkine
05c651d87f
tests: Added more tests for better code coverage
...
git-svn-id: http://pugixml.googlecode.com/svn/trunk@626 99668b35-9821-0410-8761-19e4c4f06640
2010-08-04 10:01:16 +00:00
arseny.kapoulkine
724cb46a72
tests: New and delete operators now use test allocator and thus are subject to leak detection and memory threshold failure
...
git-svn-id: http://pugixml.googlecode.com/svn/trunk@624 99668b35-9821-0410-8761-19e4c4f06640
2010-08-03 12:19:13 +00:00
arseny.kapoulkine
1b4123af9e
tests: Reduce address space pressure of test allocator
...
git-svn-id: http://pugixml.googlecode.com/svn/trunk@623 99668b35-9821-0410-8761-19e4c4f06640
2010-08-03 12:18:27 +00:00
arseny.kapoulkine
085584aa30
tests: Preparations for custom new/delete (leak detection)
...
git-svn-id: http://pugixml.googlecode.com/svn/trunk@620 99668b35-9821-0410-8761-19e4c4f06640
2010-08-03 08:03:23 +00:00
arseny.kapoulkine
4f6ecee14c
tests: More miscellaneous tests
...
git-svn-id: http://pugixml.googlecode.com/svn/trunk@619 99668b35-9821-0410-8761-19e4c4f06640
2010-08-02 20:16:53 +00:00
arseny.kapoulkine
958ee27e7f
tests: Miscellaneous test fixes
...
git-svn-id: http://pugixml.googlecode.com/svn/trunk@618 99668b35-9821-0410-8761-19e4c4f06640
2010-07-22 17:22:44 +00:00
arseny.kapoulkine
6b69701cdd
tests: Added more CDATA writing tests
...
git-svn-id: http://pugixml.googlecode.com/svn/trunk@617 99668b35-9821-0410-8761-19e4c4f06640
2010-07-22 13:13:31 +00:00
arseny.kapoulkine
f889bf88c0
tests: Removed invalid document order test, improved document order coverage by adding tests that are not subject to document order optimization
...
git-svn-id: http://pugixml.googlecode.com/svn/trunk@615 99668b35-9821-0410-8761-19e4c4f06640
2010-07-22 08:04:02 +00:00
arseny.kapoulkine
0363bccfc9
tests: Fixed warning
...
git-svn-id: http://pugixml.googlecode.com/svn/trunk@612 99668b35-9821-0410-8761-19e4c4f06640
2010-07-22 05:17:54 +00:00
arseny.kapoulkine
2ac60c851e
tests: Added stream exception test
...
git-svn-id: http://pugixml.googlecode.com/svn/trunk@611 99668b35-9821-0410-8761-19e4c4f06640
2010-07-22 05:09:50 +00:00
arseny.kapoulkine
7d24b9b565
Set svn:eol-style to native for all text files
...
git-svn-id: http://pugixml.googlecode.com/svn/trunk@607 99668b35-9821-0410-8761-19e4c4f06640
2010-07-19 09:57:32 +00:00
arseny.kapoulkine
86ac39edb0
Release archiving now converts newlines to Unix style in tar archives
...
git-svn-id: http://pugixml.googlecode.com/svn/trunk@606 99668b35-9821-0410-8761-19e4c4f06640
2010-07-19 09:46:30 +00:00
arseny.kapoulkine
2dec6dd505
tests: Added Xbox360 and PS3 toolset support
...
git-svn-id: http://pugixml.googlecode.com/svn/trunk@602 99668b35-9821-0410-8761-19e4c4f06640
2010-07-15 09:29:32 +00:00
arseny.kapoulkine
f4cb6eb737
XPath: Out-of-bounds xpath_node_set access is now undefined
...
git-svn-id: http://pugixml.googlecode.com/svn/trunk@581 99668b35-9821-0410-8761-19e4c4f06640
2010-07-10 15:48:34 +00:00
arseny.kapoulkine
c3e70f0b74
tests: Minor fix
...
git-svn-id: http://pugixml.googlecode.com/svn/trunk@573 99668b35-9821-0410-8761-19e4c4f06640
2010-07-07 21:16:47 +00:00
arseny.kapoulkine
5811786ccd
remove_child and remove_attribute now return operation result
...
git-svn-id: http://pugixml.googlecode.com/svn/trunk@572 99668b35-9821-0410-8761-19e4c4f06640
2010-07-07 20:10:48 +00:00
arseny.kapoulkine
9adf67be3a
Fixed strequalrange so that it matches the description (this also fixes first_element_by_path prefix bug), added more first_element_by_path tests
...
git-svn-id: http://pugixml.googlecode.com/svn/trunk@570 99668b35-9821-0410-8761-19e4c4f06640
2010-07-07 17:10:51 +00:00
arseny.kapoulkine
aac7a252bf
Iterator fixes: added assertions, fixed past-the-end iterator behavior wrt to iterator invalidation and comparisons
...
git-svn-id: http://pugixml.googlecode.com/svn/trunk@566 99668b35-9821-0410-8761-19e4c4f06640
2010-07-06 20:44:54 +00:00
arseny.kapoulkine
8e0c64401f
xml_node::all_elements_by_name is now deprecated
...
git-svn-id: http://pugixml.googlecode.com/svn/trunk@563 99668b35-9821-0410-8761-19e4c4f06640
2010-07-06 18:51:29 +00:00
arseny.kapoulkine
8f27f244d0
parse_wnorm_attribute is no longer deprecated (it's part of W3C recommendations, after all)
...
git-svn-id: http://pugixml.googlecode.com/svn/trunk@557 99668b35-9821-0410-8761-19e4c4f06640
2010-07-01 18:01:12 +00:00
arseny.kapoulkine
aeaa1da161
Renamed encoding_t to xml_encoding, renamed xpath_type_t to xpath_value_type
...
git-svn-id: http://pugixml.googlecode.com/svn/trunk@544 99668b35-9821-0410-8761-19e4c4f06640
2010-06-27 20:05:06 +00:00
arseny.kapoulkine
4394a588c2
XPath: Rewritten number->string conversion using CRT scientific format (much better XPath REC compliance)
...
git-svn-id: http://pugixml.googlecode.com/svn/trunk@523 99668b35-9821-0410-8761-19e4c4f06640
2010-06-14 18:03:50 +00:00
arseny.kapoulkine
2b29b15573
tests: Added tests for parsing offset values
...
git-svn-id: http://pugixml.googlecode.com/svn/trunk@521 99668b35-9821-0410-8761-19e4c4f06640
2010-06-13 20:00:51 +00:00
arseny.kapoulkine
ab72b14d17
Internal XML parsing error handling is done via setjmp/longjmp, all allocation errors are now handled correctly (parser returns status_out_of_memory, modification functions return errors); added tests for some out of memory situations
...
git-svn-id: http://pugixml.googlecode.com/svn/trunk@520 99668b35-9821-0410-8761-19e4c4f06640
2010-06-13 19:24:20 +00:00
arseny.kapoulkine
a562014cc2
Declaration nodes improvements (they now automatically get name "xml", they can't be inserted as a non-document child, document saving prints declaration only if there is none present in the document)
...
git-svn-id: http://pugixml.googlecode.com/svn/trunk@517 99668b35-9821-0410-8761-19e4c4f06640
2010-06-12 09:04:52 +00:00
arseny.kapoulkine
1a007d66e6
tests: Added non top-level declaration test
...
git-svn-id: http://pugixml.googlecode.com/svn/trunk@516 99668b35-9821-0410-8761-19e4c4f06640
2010-06-12 07:35:08 +00:00
arseny.kapoulkine
0ed895d79c
Refactored PI/declaration parsing, now non top-level declarations result in parsing errors
...
git-svn-id: http://pugixml.googlecode.com/svn/trunk@515 99668b35-9821-0410-8761-19e4c4f06640
2010-06-12 07:30:13 +00:00
arseny.kapoulkine
f2050e5170
tests: Fixed PI test
...
git-svn-id: http://pugixml.googlecode.com/svn/trunk@514 99668b35-9821-0410-8761-19e4c4f06640
2010-06-11 22:04:23 +00:00
arseny.kapoulkine
12843b2f1b
tests: Added more (failing) declaration/PI tests
...
git-svn-id: http://pugixml.googlecode.com/svn/trunk@513 99668b35-9821-0410-8761-19e4c4f06640
2010-06-11 21:44:28 +00:00
arseny.kapoulkine
624b5702d7
Rewritten numeric character reference parsing (fixed &#; and &#x; parsing), added more character reference tests
...
git-svn-id: http://pugixml.googlecode.com/svn/trunk@512 99668b35-9821-0410-8761-19e4c4f06640
2010-06-11 20:39:57 +00:00
arseny.kapoulkine
f8179496c7
tests: Added SunCC x64 support
...
git-svn-id: http://pugixml.googlecode.com/svn/trunk@510 99668b35-9821-0410-8761-19e4c4f06640
2010-06-11 07:30:36 +00:00
arseny.kapoulkine
6e1777619e
tests: Autotest now targets several architectures on MacOS, minor report refactoring
...
git-svn-id: http://pugixml.googlecode.com/svn/trunk@509 99668b35-9821-0410-8761-19e4c4f06640
2010-06-10 17:52:08 +00:00
arseny.kapoulkine
47c17a25d9
tests: Added C++0x support
...
git-svn-id: http://pugixml.googlecode.com/svn/trunk@505 99668b35-9821-0410-8761-19e4c4f06640
2010-06-07 16:07:03 +00:00
arseny.kapoulkine
9fa82b15f5
Optimized attribute parsing; behavior of parse_wconv changed, it now assumes that parse_eol is set
...
git-svn-id: http://pugixml.googlecode.com/svn/trunk@503 99668b35-9821-0410-8761-19e4c4f06640
2010-06-04 18:50:26 +00:00
arseny.kapoulkine
63e29e1d1e
tests: Fixed report CSS, VMs are now started in minimized state (GUI mode)
...
git-svn-id: http://pugixml.googlecode.com/svn/trunk@501 99668b35-9821-0410-8761-19e4c4f06640
2010-06-02 20:29:03 +00:00
arseny.kapoulkine
366c6d8241
tests: Add Subversion revision info to build report
...
git-svn-id: http://pugixml.googlecode.com/svn/trunk@500 99668b35-9821-0410-8761-19e4c4f06640
2010-06-02 19:27:05 +00:00
arseny.kapoulkine
95dd352eca
tests: Temporary file name is obtained via mkstemp on Unix systems
...
git-svn-id: http://pugixml.googlecode.com/svn/trunk@499 99668b35-9821-0410-8761-19e4c4f06640
2010-06-02 17:59:37 +00:00
arseny.kapoulkine
e596d86ca0
tests: Use ... instead of ### as autotest info prefix (sh compatibility)
...
git-svn-id: http://pugixml.googlecode.com/svn/trunk@498 99668b35-9821-0410-8761-19e4c4f06640
2010-06-02 07:25:38 +00:00
arseny.kapoulkine
ae83fae821
tests: Don't wait for full jam output before parsing
...
git-svn-id: http://pugixml.googlecode.com/svn/trunk@497 99668b35-9821-0410-8761-19e4c4f06640
2010-06-02 07:16:00 +00:00
arseny.kapoulkine
7703d96dcb
tests: Use colon instead of semicolon as define set separator (sh compatibility)
...
git-svn-id: http://pugixml.googlecode.com/svn/trunk@496 99668b35-9821-0410-8761-19e4c4f06640
2010-06-02 06:51:41 +00:00
arseny.kapoulkine
5a6b19b278
tests: Added -j6 jam argument for non-Windows OS
...
git-svn-id: http://pugixml.googlecode.com/svn/trunk@495 99668b35-9821-0410-8761-19e4c4f06640
2010-06-02 06:43:15 +00:00
arseny.kapoulkine
bef9439b01
tests: Fixed test race condition (a better way would be to use argv[0]-relative path, but let's leave it like that till it breaks)
...
git-svn-id: http://pugixml.googlecode.com/svn/trunk@494 99668b35-9821-0410-8761-19e4c4f06640
2010-06-02 06:37:29 +00:00
arseny.kapoulkine
c622ce6fed
tests: Redesigned test building; now all configurations of a single toolset are built in a single jam run
...
git-svn-id: http://pugixml.googlecode.com/svn/trunk@493 99668b35-9821-0410-8761-19e4c4f06640
2010-06-02 06:25:40 +00:00