Arseny Kapoulkine
b6b747244e
Adjust the workaround for -pedantic mode and fix tests
2022-11-06 10:21:35 -08:00
Arseny Kapoulkine
3b5c1fb022
tests: Fix MSVC 2005 build
...
... I forgot we still support platforms without C99, 23 years later.
2022-07-21 21:17:17 -07:00
Arseny Kapoulkine
ab8453c572
tests: Use snprintf instead of sprintf
...
sprintf now results in a deprecation warning in Xcode 14 beta.
2022-07-21 20:51:26 -07:00
Arseny Kapoulkine
f9a2a7d19e
Fix Wdouble-promotion warnings
...
We had a few places in test code and library source where we used an
implicit float->double cast; while it should preserve the value exactly,
gcc/clang implement this warning to make sure uses of double are intentional.
This change also adds the warning to Makefile to make sure we don't
regress on this warning.
Fixes #243 .
2018-11-23 23:39:22 -08:00
Arseny Kapoulkine
5867aff943
tests: Make using namespace more explicit
...
Hiding using namespace in common.hpp is somewhat surprising so remove
common.hpp and move using namespace into all .cpp files that need it.
2017-06-22 20:41:08 -07:00
Arseny Kapoulkine
4b371e10ee
tests: Remove redundant pugi:: qualifier
...
Most tests have `using namespace pugi` which makes explicit
qualifications unnecessary.
2017-06-22 20:33:02 -07:00
Arseny Kapoulkine
1a3e92a7cc
tests: Add more tests to increase coverage
...
This change adds more thorough tests for attribute conversion as well as
some assorted tests that fix gaps in coverage.
2017-01-31 20:40:50 -08:00
Arseny Kapoulkine
6ffd2ffc41
tests: Add more DOM coverage tests
...
Add tests for various corner cases of DOM inspection and modification
routines.
2017-01-31 00:10:20 -08:00
Pavel Kryukov
c7c7349cb7
Add PUGIXML_OVERRIDE to headers of tests
2016-10-13 01:36:12 +03:00
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