Stephan Beyer
f7aa65db8a
Fix whitespace issues
...
Git warns when it finds "whitespace errors". This commit gets
rid of these whitespace errors for code and adoc files.
2016-01-24 14:05:44 +01:00
Arseny Kapoulkine
fd605bc9a7
tests: Fix GCC warning
...
Fix "this decimal constant is unsigned only in ISO C90".
2015-10-17 12:20:21 -07:00
Arseny Kapoulkine
0e09571f21
Fix integer overflow detection with leading zeros
...
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-17 10:33:50 -07:00
Arseny Kapoulkine
3229e67712
Fix parsing of integers that start with +
...
This matches the format strtol supports.
2015-09-21 00:35:57 -07:00
Arseny Kapoulkine
5b86a8f612
tests: Add tests for integer overflow during conversion
...
These tests are only testing attribute as_int in hopes that xml_text uses the
same underlying implementation (which it does).
2015-09-20 10:48:30 -07:00
Arseny Kapoulkine
97afc16ef2
tests: Add newline at the end of file
2015-05-22 20:20:03 -07:00
Arseny Kapoulkine
f828eae3ea
Implement xml_node::attribute with a hint
...
Extra argument 'hint' is used to start the attribute lookup; if the attribute
is not found the lookup is restarted from the beginning of the attriubte list.
This allows to optimize attribute lookups if you need to get many attributes
from the node and can make assumptions about the likely ordering. The code is
correct regardless of the order, but it is faster than using vanilla lookups
if the order matches the calling order.
Fixes #30 .
2015-05-14 08:04:06 -07:00
Arseny Kapoulkine
4eadece45f
tests: Add move semantics tests
...
Also test ranged for and copying big xpath_variable_set objects (to make
sure we actually handle hash collisions properly)
2015-04-21 19:44:19 -07:00
Arseny Kapoulkine
2537cccad3
tests: Fix some Coverity issues
2015-04-12 02:17:20 -07: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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
a9d08d9923
tests: Improved IntelC support, added more compilers to autotest, removed old autotest script
...
git-svn-id: http://pugixml.googlecode.com/svn/trunk@490 99668b35-9821-0410-8761-19e4c4f06640
2010-06-01 05:41:26 +00:00
arseny.kapoulkine
ba1b2017db
as_* functions now all use strto*/wcsto* functions; this unifies the behavior and fixes large unsigned integer parsing in as_uint
...
git-svn-id: http://pugixml.googlecode.com/svn/trunk@438 99668b35-9821-0410-8761-19e4c4f06640
2010-05-20 20:35:49 +00:00
arseny.kapoulkine
6706a3f8ba
Deprecated all wildcard functions and parse_wnorm_attribute
...
git-svn-id: http://pugixml.googlecode.com/svn/trunk@389 99668b35-9821-0410-8761-19e4c4f06640
2010-05-08 20:30:29 +00:00
arseny.kapoulkine
f542c5ebb8
Integrated changes from unicode branch to trunk
...
git-svn-id: http://pugixml.googlecode.com/svn/trunk@383 99668b35-9821-0410-8761-19e4c4f06640
2010-05-06 20:28:36 +00:00
arseny.kapoulkine
48bbb9f4dd
tests: Extracted generic tests in a separate header, better filter tests, some API tests added
...
git-svn-id: http://pugixml.googlecode.com/svn/trunk@221 99668b35-9821-0410-8761-19e4c4f06640
2009-11-08 13:52:55 +00:00
arseny.kapoulkine
a70f6b1a70
tests: CodeWarrior and BCC supported
...
git-svn-id: http://pugixml.googlecode.com/svn/trunk@195 99668b35-9821-0410-8761-19e4c4f06640
2009-10-29 21:47:37 +00:00
arseny.kapoulkine
fc602fd375
tests: Supported all pugixml compilation modes
...
git-svn-id: http://pugixml.googlecode.com/svn/trunk@191 99668b35-9821-0410-8761-19e4c4f06640
2009-10-29 07:17:30 +00:00
arseny.kapoulkine
0640f87859
tests: More fixes and toolsets support
...
git-svn-id: http://pugixml.googlecode.com/svn/trunk@190 99668b35-9821-0410-8761-19e4c4f06640
2009-10-28 22:22:19 +00:00
arseny.kapoulkine
9216c82cfd
tests: Fixed MSVC warnings/errors
...
git-svn-id: http://pugixml.googlecode.com/svn/trunk@185 99668b35-9821-0410-8761-19e4c4f06640
2009-10-28 20:08:19 +00:00
arseny.kapoulkine
a837271e9d
tests: Added wildcard and doctype tests
...
git-svn-id: http://pugixml.googlecode.com/svn/trunk@163 99668b35-9821-0410-8761-19e4c4f06640
2009-10-20 20:51:20 +00:00
arseny.kapoulkine
473ab35934
tests: Some finishing touches for test_dom_traverse (for now)
...
git-svn-id: http://pugixml.googlecode.com/svn/trunk@147 99668b35-9821-0410-8761-19e4c4f06640
2009-10-11 09:06:01 +00:00
arseny.kapoulkine
29e42bb25f
tests: Added more node tests
...
git-svn-id: http://pugixml.googlecode.com/svn/trunk@145 99668b35-9821-0410-8761-19e4c4f06640
2009-10-11 08:39:40 +00:00