79 Commits

Author SHA1 Message Date
Mohammad Nejati
f898602464 Suppress warnings from dependency libraries 2025-06-09 15:27:25 +00:00
Rene Rivera
6081cec6ad Update build deps. 2024-08-07 22:44:06 -05:00
Rene Rivera
ee02ce953c Add missing lib reference. 2024-04-25 22:48:32 -05:00
Rene Rivera
3ab0e3def5 Make the library modular usable. 2024-03-11 08:38:17 -05:00
Mohammad Nejati
6b16249a09 Make operator / a friend of string_path
Fixes #24
2023-12-05 15:39:57 +00:00
Mohammad Nejati
b7692c2872 Add compile test to check for missing includes 2023-11-29 14:47:12 +00:00
Peter Dimov
5a36e4ce22 Disable -Wself-assign-overloaded 2023-11-21 18:11:07 +02:00
Peter Dimov
735513f839 Use <warnings>off for boost_serialization 2023-11-21 18:03:50 +02:00
Peter Dimov
174481c221 Avoid shadowing warnings 2023-11-21 18:00:45 +02:00
Peter Dimov
877ae777a9 Enable warnings=extra, warnings-as-errors=on in test/Jamfile 2023-11-21 17:46:47 +02:00
Mohammad Nejati
5438bf79d2 Prevent calls to get_child with temporary default values
Resolves #42
2023-11-20 11:03:37 +00:00
Erich Keane
71dd658325 Fix write_json non-pretty print extra endl
According to bug #12149, the non-pretty version of write_json should not
print the trailing endl.  This patch only prints the endl in the pretty
case, and only does the flush component of the endl in the non-pretty
version.

Signed-off-by: Erich Keane <erich.keane@intel.com>
2023-11-17 16:59:57 +02:00
Peter Dimov
0f076a3d01 Merge branch 'compile-test-with-BOOST_BIND_NO_PLACEHOLDERS-defined' of https://github.com/ashtum/property_tree into feature/pr-101 2023-11-16 15:00:22 +02:00
Mohammad Nejati
9d37199bf3 Add compile test with BOOST_BIND_NO_PLACEHOLDERS defined 2023-11-16 12:45:17 +00:00
Peter Dimov
987c47e72a Update cmake_subdir_test/main.cpp, cmake_install_test/main.cpp 2023-11-16 14:27:13 +02:00
Peter Dimov
3209276068 Update test/CMakeLists.txt 2023-11-15 03:07:12 +02:00
Peter Dimov
293bbc5288 Update test/Jamfile 2023-11-15 02:45:03 +02:00
Peter Dimov
eae3d0ad69 Add cmake_install_test, cmake_subdir_test 2023-11-05 14:52:37 +02:00
Peter Dimov
5919907291 Update CMakeLists.txt, test/CMakeLists.txt 2021-06-08 11:06:38 +02:00
Richard Hodges
4b8173378c Fix names of targets in CMake build:
This project's CMakeLists.txt must exist in the boost ecosystem. In
order to avoid ambiguity of target names across boost libraries, targets
in this project are prefixed with boost_property_tree-
2021-05-28 16:42:28 +02:00
Richard Hodges
e510cb1ace Fix missing include in rapidxml
closes #82
2021-05-06 17:39:34 +02:00
Richard Hodges
61aeb12ecd Fix github actions CI:
- Also remove dependency on boost test framework

closes #75
2021-03-11 14:27:05 +01:00
Richard Hodges
8feb1d9072 add all tests to cmake 2021-03-09 11:10:24 +01:00
Richard Hodges
74a9a09367 Add GitHub Actions CI 2021-03-09 10:03:05 +01:00
Peter Dimov
0c3b65e243 Fix MSVC test failure in test_property_tree 2021-03-08 23:05:30 +02:00
Sebastian Redl
ea94099069 Reorganize headers to more closely match the namespace hierarchy. 2016-02-11 14:58:14 +01:00
Sebastian Redl
f5df03024e Remove custom-build directory.
The build files in this directory are neither maintained nor tested. They
are already outdated (VS 2008 projects) and will only get more so. I have
no intention of maintaining them.
2016-02-10 11:22:32 +01:00
Sebastian Redl
b4c3029c12 Skip BOMs at the start of the input. 2015-07-07 15:52:57 +02:00
Sebastian Redl
8bdb5439be Fix C++11 uses, gcc/clang warnings and errors, and an incompatibility with the new Boost.Test. 2015-07-02 16:07:23 +02:00
Sebastian Redl
7f3947c13b Add the extensive tests for the new JSON parser. Clean up the test Jamfile.
The new file contains lots of small unit tests for the new JSON parser, far more extensive than the old one.
Keep the old file too, though, because it contains writing and round-trip tests.
2015-06-26 11:10:05 +02:00
Sebastian Redl
b2c488be9b Replace the JSON parser with a new one.
TL;DR: The new parser fixes long-standing bugs and has full Unicode support, but removes non-standard extensions
of the old parser, which could break code:
- String concatenation: the old parser concatenated adjacent string literals like C does.
- Comments: the old parser supported C and C++-style comments. JSON doesn't allow comments.

The JSON writer hasn't been changed; it still has all the Unicode-related problems.

The old JSON parser had quite a few problems:
- Slow to compile.
- Based on the obsolete Spirit.Classic.
- Inherited a multithreading bug from Spirit.Classic (see bug #5520).
- Poor to no support for Unicode.
- Weird departures from standard JSON.
- Tightly bound to string-based property trees.

The new parser has the following features:
- Hand-written recursive descent parser - few template instantiations, fast to compile.
- Parses through a pair of iterators with support for input iterators - can parse directly from streambuf_iterators.
  Doesn't need to load the entire file into memory first.
- Push-based stream model.
- Full support for Unicode. Assumes that char is UTF-8. If wchar_t is 16 bits, assumes UTF-16, with support for surrogate pairs.
- Pluggable encoding support. The public interface doesn't expose this yet. Currently, narrow input streams are assumed to use
  UTF-8 both internally and externally, and wide streams are assumed to use UTF-16 or UTF-32, depending on the bit width of wchar_t.
  Malformed encodings are not accepted.
  The pluggable support allows inserting other external encodings, or making narrow streams parse into wide internal trees, etc.
- Replaceable event handlers. Also not exposed by the public interface, the replaceable event handlers allow parsing into non-string
  property trees and preserving type information of the JSON.
2015-06-26 10:32:29 +02:00
Sebastian Redl
40347030c7 Fix storage precision for floating point numbers.
Fixes bug 10188. Patch by Mange OEstlyngen.
2015-01-23 13:24:45 +01:00
Sebastian Redl
bf1e1b12e7 Let stream_translator fail for signed/unsigned char over/underflow on read.
Fixes bug 7615.
2015-01-22 16:45:38 +01:00
Sebastian Redl
3e6acfd11d Fix equality for non-standard key comparers.
Re-enable tests for case-insensitive property trees.
2015-01-22 16:31:18 +01:00
Sebastian Redl
caa8274643 Enable core wide char tests.
These apparently were disabled since my rewrite before this was ever merged
to release. Very embarrassing.
2015-01-22 13:10:06 +01:00
Sebastian Redl
0af93b93db Reduce incredible repetition in test_property_tree.cpp. 2015-01-22 12:51:11 +01:00
Sebastian Redl
dc2586b4e1 Hopefully fix XML parser tests for GCC 5.0 2015-01-22 12:32:26 +01:00
Sebastian Redl
b87d743944 Fix compilation of ini parser. Fix test to check the right thing. 2015-01-22 11:59:56 +01:00
Sebastian Redl
2463e8732e INI parser: write top-level keys before sections.
Sections don't end in INIs, once the first one is entered, it's impossible
to get back to top level.

Also refactors write_ini a bit.

Fixes bug 4973.
2015-01-21 15:01:03 +01:00
Sebastian Redl
c452635a08 Fix JSON non-ASCII escaping test to work with MSVC. 2015-01-21 12:16:24 +01:00
Berkus Decker
5c26e8d8b2 Add escaping tests. 2014-11-12 20:31:40 +02:00
Alexander Bogdashevsky
8af8b6bf3b support for non-std::string keys 2014-04-15 06:19:02 -04:00
Sebastian Redl
85f8d8866c Merge branch 'develop'.
Merges fixes for bugs 7519, 7180, 6582.
2014-02-24 13:51:50 +01:00
Sebastian Redl
291055c65a Log more data in exact roundtrip tests.
This ought to help me track down the test failure  on the msvc12 builder.
2014-02-13 16:18:19 +01:00
Sebastian Redl
530e6fe5eb Fix JSON array compact printing.
Fixes bug 7180.

As drive-by fixes, actually test the pretty printer and don't ever
start a new line after a property name.
2014-02-11 16:54:07 +01:00
Sebastian Redl
23d8e7bbbe Delete files that shouldn't have been there. These are either SVN conversion zombies, or maybe I never merged this from devel. Either way they're gone now. 2013-12-20 13:52:24 +01:00
Sebastian Redl
c3e643059e Merge r78550 to release. Fixes an outdated test to work again. Fixes bug #6785. Fixes bug #6808.
[SVN r78679]
2012-05-27 13:16:21 +00:00
Sebastian Redl
5dee8275ab Remove a stray semicolon. Fix a type conversion that has become invalid in C++11. Update the XML parser test to cope with the new detail/utf8_codecvt layout. See bugs 6808 and 6785 for the first two issues.
[SVN r78550]
2012-05-23 12:09:27 +00:00
Sebastian Redl
9b707a030d Merge [72000],[72001],[72003], [74691], [75587], [75589], [75590], and [75593]
from trunk.
Fixes bug 4840.
Fixes bug 5259.
Fixes bug 5281, I think.
Fixes bug 5944.
Fixes bug 5757.
Fixes bug 5710.
Fixes bug 5307, I think.

[SVN r76447]
2012-01-13 12:20:39 +00:00
Sebastian Redl
0181c0f723 Suppress the MSVC insecure warning when compiling tests. Make argument-less sort() work. See bug #5710.
[SVN r75590]
2011-11-21 12:52:12 +00:00