mirror of
https://github.com/boostorg/property_tree.git
synced 2026-02-20 02:52:10 +00:00
Merge branch 'develop' for release 1.76.0
This commit is contained in:
43
.drone.star
Normal file
43
.drone.star
Normal file
@@ -0,0 +1,43 @@
|
||||
# Use, modification, and distribution are
|
||||
# subject to the Boost Software License, Version 1.0. (See accompanying
|
||||
# file LICENSE.txt)
|
||||
#
|
||||
# Copyright Rene Rivera 2020.
|
||||
|
||||
# For Drone CI we use the Starlark scripting language to reduce duplication.
|
||||
# As the yaml syntax for Drone CI is rather limited.
|
||||
#
|
||||
#
|
||||
|
||||
globalenv={'B2_CI_VERSION': '1', 'B2_VARIANT': 'release'}
|
||||
linuxglobalimage="cppalliance/droneubuntu1604:1"
|
||||
windowsglobalimage="cppalliance/dronevs2019"
|
||||
|
||||
def main(ctx):
|
||||
return [
|
||||
linux_cxx("COMMENT=codecov.io B2_CXXSTD=03,11 B2_TOOLSET Job 0", "g++-8", packages="g++-8 locales", buildtype="fc4716b68c-0fcaf592f9", buildscript="drone", image=linuxglobalimage, environment={'COMMENT': 'codecov.io', 'B2_CXXSTD': '03,11', 'B2_TOOLSET': 'gcc-8', 'B2_DEFINES': 'BOOST_NO_STRESS_TEST=1', 'DRONE_JOB_UUID': 'b6589fc6ab'}, globalenv=globalenv),
|
||||
linux_cxx("COMMENT=asan B2_VARIANT=debug B2_TOOLSET=gcc- Job 1", "g++-8", packages="g++-8 locales", buildtype="boost", buildscript="drone", image=linuxglobalimage, environment={'COMMENT': 'asan', 'B2_VARIANT': 'debug', 'B2_TOOLSET': 'gcc-8', 'B2_CXXSTD': '03,11,14', 'B2_ASAN': '1', 'B2_DEFINES': 'BOOST_NO_STRESS_TEST=1', 'DRONE_EXTRA_PRIVILEGED': 'True', 'DRONE_JOB_UUID': '356a192b79'}, globalenv=globalenv, privileged=True),
|
||||
linux_cxx("COMMENT=tsan B2_VARIANT=debug B2_TOOLSET=gcc- Job 2", "g++-8", packages="g++-8 locales", buildtype="boost", buildscript="drone", image=linuxglobalimage, environment={'COMMENT': 'tsan', 'B2_VARIANT': 'debug', 'B2_TOOLSET': 'gcc-8', 'B2_CXXSTD': '03,11,14', 'B2_TSAN': '1', 'B2_DEFINES': 'BOOST_NO_STRESS_TEST=1', 'DRONE_JOB_UUID': 'da4b9237ba'}, globalenv=globalenv),
|
||||
linux_cxx("COMMENT=ubsan B2_VARIANT=debug B2_TOOLSET=gcc Job 3", "g++-8", packages="g++-8 locales", buildtype="boost", buildscript="drone", image=linuxglobalimage, environment={'COMMENT': 'ubsan', 'B2_VARIANT': 'debug', 'B2_TOOLSET': 'gcc-8', 'B2_CXXSTD': '03,11,14', 'B2_UBSAN': '1', 'B2_DEFINES': 'BOOST_NO_STRESS_TEST=1', 'B2_LINKFLAGS': '-fuse-ld=gold', 'DRONE_JOB_UUID': '77de68daec'}, globalenv=globalenv),
|
||||
linux_cxx("COMMENT=valgrind B2_TOOLSET=clang-6.0 B2_CXXS Job 4", "clang++-6.0", packages="clang-6.0 libc6-dbg libc++-dev libstdc++-8-dev locales", llvm_os="xenial", llvm_ver="6.0", buildtype="fc4716b68c-db180b7bd2", buildscript="drone", image=linuxglobalimage, environment={'COMMENT': 'valgrind', 'B2_TOOLSET': 'clang-6.0', 'B2_CXXSTD': '03,11,14', 'B2_DEFINES': 'BOOST_NO_STRESS_TEST=1', 'B2_VARIANT': 'debug', 'B2_TESTFLAGS': 'testing.launcher=valgrind', 'VALGRIND_OPTS': '--error-exitcode=1', 'DRONE_JOB_UUID': '1b64538924'}, globalenv=globalenv),
|
||||
linux_cxx("B2_TOOLSET=gcc-4.8 B2_CXXSTD=03,11 Job 5", "g++-4.8", packages="g++-4.8 locales", buildtype="boost", buildscript="drone", image="cppalliance/droneubuntu1404:1", environment={'B2_TOOLSET': 'gcc-4.8', 'B2_CXXSTD': '03,11', 'DRONE_JOB_UUID': 'ac3478d69a'}, globalenv=globalenv),
|
||||
linux_cxx("B2_TOOLSET=gcc-4.9 B2_CXXSTD=03,11 Job 6", "g++-4.9", packages="g++-4.9 locales", buildtype="boost", buildscript="drone", image="cppalliance/droneubuntu1404:1", environment={'B2_TOOLSET': 'gcc-4.9', 'B2_CXXSTD': '03,11', 'DRONE_JOB_UUID': 'c1dfd96eea'}, globalenv=globalenv),
|
||||
linux_cxx("B2_TOOLSET=gcc-5 B2_CXXSTD=03,11 Job 7", "g++-5", packages="g++-5 locales", buildtype="boost", buildscript="drone", image=linuxglobalimage, environment={'B2_TOOLSET': 'gcc-5', 'B2_CXXSTD': '03,11', 'DRONE_JOB_UUID': '902ba3cda1'}, globalenv=globalenv),
|
||||
linux_cxx("B2_TOOLSET=gcc-6 B2_CXXSTD=11,14 Job 8", "g++-6", packages="g++-6 locales", buildtype="boost", buildscript="drone", image=linuxglobalimage, environment={'B2_TOOLSET': 'gcc-6', 'B2_CXXSTD': '11,14', 'DRONE_JOB_UUID': 'fe5dbbcea5'}, globalenv=globalenv),
|
||||
linux_cxx("B2_TOOLSET=gcc-7 B2_CXXSTD=14,17 Job 9", "g++-7", packages="g++-7 locales", buildtype="boost", buildscript="drone", image=linuxglobalimage, environment={'B2_TOOLSET': 'gcc-7', 'B2_CXXSTD': '14,17', 'DRONE_JOB_UUID': '0ade7c2cf9'}, globalenv=globalenv),
|
||||
linux_cxx("B2_TOOLSET=gcc-8 B2_CXXSTD=17,2a Job 10", "g++-8", packages="g++-8 locales", buildtype="boost", buildscript="drone", image=linuxglobalimage, environment={'B2_TOOLSET': 'gcc-8', 'B2_CXXSTD': '17,2a', 'DRONE_JOB_UUID': 'b1d5781111'}, globalenv=globalenv),
|
||||
linux_cxx("B2_TOOLSET=gcc-9 B2_CXXSTD=17,2a Job 11", "g++-9", packages="g++-9 locales", buildtype="boost", buildscript="drone", image=linuxglobalimage, environment={'B2_TOOLSET': 'gcc-9', 'B2_CXXSTD': '17,2a', 'DRONE_JOB_UUID': '17ba079149'}, globalenv=globalenv),
|
||||
linux_cxx("B2_TOOLSET=clang-3.8 B2_CXXSTD=03,11 Job 12", "clang++-3.8 locales", packages="clang-3.8 locales", buildtype="boost", buildscript="drone", image="cppalliance/droneubuntu1404:1", environment={'B2_TOOLSET': 'clang-3.8', 'B2_CXXSTD': '03,11', 'DRONE_JOB_UUID': '7b52009b64'}, globalenv=globalenv),
|
||||
linux_cxx("B2_TOOLSET=clang-4.0 B2_CXXSTD=11,14 Job 13", "clang++-4.0 locales", packages="clang-4.0 libstdc++-6-dev locales", llvm_os="xenial", llvm_ver="4.0", buildtype="boost", buildscript="drone", image=linuxglobalimage, environment={'B2_TOOLSET': 'clang-4.0', 'B2_CXXSTD': '11,14', 'DRONE_JOB_UUID': 'bd307a3ec3'}, globalenv=globalenv),
|
||||
linux_cxx("B2_TOOLSET=clang-5.0 B2_CXXSTD=11,14 Job 14", "clang++-5.0 locales", packages="clang-5.0 libstdc++-7-dev locales", llvm_os="xenial", llvm_ver="5.0", buildtype="boost", buildscript="drone", image=linuxglobalimage, environment={'B2_TOOLSET': 'clang-5.0', 'B2_CXXSTD': '11,14', 'DRONE_JOB_UUID': 'fa35e19212'}, globalenv=globalenv),
|
||||
linux_cxx("B2_TOOLSET=clang-6.0 B2_CXXSTD=14,17 Job 15", "clang++-6.0 locales", packages="clang-6.0 libc6-dbg libc++-dev libstdc++-8-dev locales", llvm_os="xenial", llvm_ver="6.0", buildtype="boost", buildscript="drone", image=linuxglobalimage, environment={'B2_TOOLSET': 'clang-6.0', 'B2_CXXSTD': '14,17', 'DRONE_JOB_UUID': 'f1abd67035'}, globalenv=globalenv),
|
||||
linux_cxx("B2_TOOLSET=clang-7 B2_CXXSTD=17,2a Job 16", "clang++-7 locales", packages="clang-7 libc6-dbg libc++-dev libstdc++-8-dev locales", llvm_os="xenial", llvm_ver="7", buildtype="boost", buildscript="drone", image=linuxglobalimage, environment={'B2_TOOLSET': 'clang-7', 'B2_CXXSTD': '17,2a', 'DRONE_JOB_UUID': '1574bddb75'}, globalenv=globalenv),
|
||||
linux_cxx("B2_TOOLSET=clang-8 B2_CXXSTD=17,2a Job 17", "clang++-8 locales", packages="clang-8 libc6-dbg libc++-dev libstdc++-8-dev locales", llvm_os="xenial", llvm_ver="8", buildtype="boost", buildscript="drone", image=linuxglobalimage, environment={'B2_TOOLSET': 'clang-8', 'B2_CXXSTD': '17,2a', 'DRONE_JOB_UUID': '0716d9708d'}, globalenv=globalenv),
|
||||
linux_cxx("B2_TOOLSET=clang-9 B2_CXXSTD=03,11,14,17,2a Job 18", "clang++-9 locales", packages="clang-8 libc6-dbg libc++-dev libstdc++-8-dev locales", llvm_os="xenial", llvm_ver="8", buildtype="boost", buildscript="drone", image=linuxglobalimage, environment={'B2_TOOLSET': 'clang-9', 'B2_CXXSTD': '03,11,14,17,2a', 'DRONE_JOB_UUID': '9e6a55b6b4'}, globalenv=globalenv),
|
||||
linux_cxx("B2_TOOLSET=clang-6.0 B2_CXXSTD=03,11,14 B2_ST Job 19", "clang++-6.0 locales", packages="clang-6.0 libc6-dbg libc++-dev libstdc++-8-dev locales", llvm_os="xenial", llvm_ver="6.0", buildtype="boost", buildscript="drone", image=linuxglobalimage, environment={'B2_TOOLSET': 'clang-6.0', 'B2_CXXSTD': '03,11,14', 'B2_STDLIB': 'libc++', 'DRONE_JOB_UUID': 'b3f0c7f6bb'}, globalenv=globalenv),
|
||||
osx_cxx("B2_TOOLSET=clang B2_CXXSTD=03,11,17 Job 20", "g++", packages="", buildtype="boost", buildscript="drone", environment={'B2_TOOLSET': 'clang', 'B2_CXXSTD': '03,11,17', 'DRONE_JOB_UUID': '91032ad7bb'}, globalenv=globalenv),
|
||||
linux_cxx("COMMENT=Coverity Scan B2_TOOLSET=clang Job 21", "g++", packages="locales", buildtype="fc4716b68c-cce9827eb5", buildscript="drone", image=linuxglobalimage, environment={'COMMENT': 'Coverity Scan', 'B2_TOOLSET': 'clang', 'DRONE_JOB_UUID': '472b07b9fc'}, globalenv=globalenv),
|
||||
]
|
||||
|
||||
# from https://github.com/boostorg/boost-ci
|
||||
load("@boost_ci//ci/drone/:functions.star", "linux_cxx","windows_cxx","osx_cxx","freebsd_cxx")
|
||||
120
.drone/drone.sh
Executable file
120
.drone/drone.sh
Executable file
@@ -0,0 +1,120 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Copyright 2020 Rene Rivera, Sam Darwin
|
||||
# Distributed under the Boost Software License, Version 1.0.
|
||||
# (See accompanying file LICENSE.txt or copy at http://boost.org/LICENSE_1_0.txt)
|
||||
|
||||
set -e
|
||||
export TRAVIS_BUILD_DIR=$(pwd)
|
||||
export DRONE_BUILD_DIR=$(pwd)
|
||||
export TRAVIS_BRANCH=$DRONE_BRANCH
|
||||
export TRAVIS_EVENT_TYPE=$DRONE_BUILD_EVENT
|
||||
export VCS_COMMIT_ID=$DRONE_COMMIT
|
||||
export GIT_COMMIT=$DRONE_COMMIT
|
||||
export REPO_NAME=$DRONE_REPO
|
||||
export USER=$(whoami)
|
||||
export CC=${CC:-gcc}
|
||||
export PATH=~/.local/bin:/usr/local/bin:$PATH
|
||||
|
||||
if [[ ${TRAVIS_OS_NAME} =~ [Ll]inux ]]; then
|
||||
echo Installing locales for ${TRAVIS_OS_NAME} ...
|
||||
sudo /usr/sbin/locale-gen fr_FR
|
||||
sudo /usr/sbin/locale-gen en_GB
|
||||
sudo locale -a
|
||||
echo ...done with locales
|
||||
fi
|
||||
|
||||
if [ "$DRONE_JOB_BUILDTYPE" == "boost" ]; then
|
||||
|
||||
echo '==================================> INSTALL'
|
||||
|
||||
git clone https://github.com/boostorg/boost-ci.git boost-ci-cloned
|
||||
cp -prf boost-ci-cloned/ci .
|
||||
rm -rf boost-ci-cloned
|
||||
|
||||
if [ "$TRAVIS_OS_NAME" == "osx" ]; then
|
||||
unset -f cd
|
||||
fi
|
||||
|
||||
export SELF=`basename $REPO_NAME`
|
||||
export BOOST_CI_TARGET_BRANCH="$TRAVIS_BRANCH"
|
||||
export BOOST_CI_SRC_FOLDER=$(pwd)
|
||||
|
||||
. ./ci/common_install.sh
|
||||
|
||||
echo '==================================> SCRIPT'
|
||||
|
||||
$BOOST_ROOT/libs/$SELF/ci/travis/build.sh
|
||||
|
||||
elif [ "$DRONE_JOB_BUILDTYPE" == "fc4716b68c-0fcaf592f9" ]; then
|
||||
|
||||
echo '==================================> INSTALL'
|
||||
|
||||
git clone https://github.com/boostorg/boost-ci.git boost-ci-cloned
|
||||
cp -prf boost-ci-cloned/ci .
|
||||
rm -rf boost-ci-cloned
|
||||
|
||||
if [ "$TRAVIS_OS_NAME" == "osx" ]; then
|
||||
unset -f cd
|
||||
fi
|
||||
|
||||
export SELF=`basename $REPO_NAME`
|
||||
export BOOST_CI_TARGET_BRANCH="$TRAVIS_BRANCH"
|
||||
export BOOST_CI_SRC_FOLDER=$(pwd)
|
||||
|
||||
. ./ci/common_install.sh
|
||||
|
||||
echo '==================================> SCRIPT'
|
||||
|
||||
cd $BOOST_ROOT/libs/$SELF
|
||||
ci/travis/codecov.sh
|
||||
|
||||
elif [ "$DRONE_JOB_BUILDTYPE" == "fc4716b68c-db180b7bd2" ]; then
|
||||
|
||||
echo '==================================> INSTALL'
|
||||
|
||||
git clone https://github.com/boostorg/boost-ci.git boost-ci-cloned
|
||||
cp -prf boost-ci-cloned/ci .
|
||||
rm -rf boost-ci-cloned
|
||||
|
||||
if [ "$TRAVIS_OS_NAME" == "osx" ]; then
|
||||
unset -f cd
|
||||
fi
|
||||
|
||||
export SELF=`basename $REPO_NAME`
|
||||
export BOOST_CI_TARGET_BRANCH="$TRAVIS_BRANCH"
|
||||
export BOOST_CI_SRC_FOLDER=$(pwd)
|
||||
|
||||
. ./ci/common_install.sh
|
||||
|
||||
echo '==================================> SCRIPT'
|
||||
|
||||
cd $BOOST_ROOT/libs/$SELF
|
||||
ci/travis/valgrind.sh
|
||||
|
||||
elif [ "$DRONE_JOB_BUILDTYPE" == "fc4716b68c-cce9827eb5" ]; then
|
||||
|
||||
echo '==================================> INSTALL'
|
||||
|
||||
git clone https://github.com/boostorg/boost-ci.git boost-ci-cloned
|
||||
cp -prf boost-ci-cloned/ci .
|
||||
rm -rf boost-ci-cloned
|
||||
|
||||
if [ "$TRAVIS_OS_NAME" == "osx" ]; then
|
||||
unset -f cd
|
||||
fi
|
||||
|
||||
export SELF=`basename $REPO_NAME`
|
||||
export BOOST_CI_TARGET_BRANCH="$TRAVIS_BRANCH"
|
||||
export BOOST_CI_SRC_FOLDER=$(pwd)
|
||||
|
||||
. ./ci/common_install.sh
|
||||
|
||||
echo '==================================> SCRIPT'
|
||||
|
||||
if [ -n "${COVERITY_SCAN_NOTIFICATION_EMAIL}" -a \( "$TRAVIS_BRANCH" = "develop" -o "$TRAVIS_BRANCH" = "master" \) -a \( "$DRONE_BUILD_EVENT" = "push" -o "$DRONE_BUILD_EVENT" = "cron" \) ] ; then
|
||||
cd $BOOST_ROOT/libs/$SELF
|
||||
ci/travis/coverity.sh
|
||||
fi
|
||||
|
||||
fi
|
||||
248
.github/workflows/ci.yml
vendored
Normal file
248
.github/workflows/ci.yml
vendored
Normal file
@@ -0,0 +1,248 @@
|
||||
name: CI
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
- develop
|
||||
- feature/**
|
||||
|
||||
env:
|
||||
UBSAN_OPTIONS: print_stacktrace=1
|
||||
|
||||
jobs:
|
||||
posix:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- toolset: gcc-4.7
|
||||
cxxstd: "03,11"
|
||||
os: ubuntu-16.04
|
||||
install: g++-4.7
|
||||
- toolset: gcc-4.8
|
||||
cxxstd: "03,11"
|
||||
os: ubuntu-16.04
|
||||
install: g++-4.8
|
||||
- toolset: gcc-4.9
|
||||
cxxstd: "03,11"
|
||||
os: ubuntu-16.04
|
||||
install: g++-4.9
|
||||
- toolset: gcc-5
|
||||
cxxstd: "03,11,14,1z"
|
||||
os: ubuntu-16.04
|
||||
- toolset: gcc-6
|
||||
cxxstd: "03,11,14,1z"
|
||||
os: ubuntu-16.04
|
||||
install: g++-6
|
||||
- toolset: gcc-7
|
||||
cxxstd: "03,11,14,17"
|
||||
os: ubuntu-18.04
|
||||
- toolset: gcc-8
|
||||
cxxstd: "03,11,14,17,2a"
|
||||
os: ubuntu-18.04
|
||||
- toolset: gcc-9
|
||||
cxxstd: "03,11,14,17,2a"
|
||||
os: ubuntu-18.04
|
||||
- toolset: gcc-10
|
||||
cxxstd: "03,11,14,17,2a"
|
||||
os: ubuntu-18.04
|
||||
- toolset: clang
|
||||
compiler: clang++-3.5
|
||||
cxxstd: "03,11,14"
|
||||
os: ubuntu-16.04
|
||||
install: clang-3.5
|
||||
- toolset: clang
|
||||
compiler: clang++-3.6
|
||||
cxxstd: "03,11,14"
|
||||
os: ubuntu-16.04
|
||||
install: clang-3.6
|
||||
- toolset: clang
|
||||
compiler: clang++-3.7
|
||||
cxxstd: "03,11,14"
|
||||
os: ubuntu-16.04
|
||||
install: clang-3.7
|
||||
- toolset: clang
|
||||
compiler: clang++-3.8
|
||||
cxxstd: "03,11,14"
|
||||
os: ubuntu-16.04
|
||||
install: clang-3.8
|
||||
- toolset: clang
|
||||
compiler: clang++-3.9
|
||||
cxxstd: "03,11,14"
|
||||
os: ubuntu-16.04
|
||||
install: clang-3.9
|
||||
- toolset: clang
|
||||
compiler: clang++-4.0
|
||||
cxxstd: "03,11,14"
|
||||
os: ubuntu-16.04
|
||||
install: clang-4.0
|
||||
- toolset: clang
|
||||
compiler: clang++-5.0
|
||||
cxxstd: "03,11,14,1z"
|
||||
os: ubuntu-16.04
|
||||
install: clang-5.0
|
||||
- toolset: clang
|
||||
compiler: clang++-6.0
|
||||
cxxstd: "03,11,14,17"
|
||||
os: ubuntu-18.04
|
||||
- toolset: clang
|
||||
compiler: clang++-7
|
||||
cxxstd: "03,11,14,17"
|
||||
os: ubuntu-18.04
|
||||
install: clang-7
|
||||
- toolset: clang
|
||||
compiler: clang++-8
|
||||
cxxstd: "03,11,14,17,2a"
|
||||
os: ubuntu-20.04
|
||||
- toolset: clang
|
||||
compiler: clang++-9
|
||||
cxxstd: "03,11,14,17,2a"
|
||||
os: ubuntu-20.04
|
||||
- toolset: clang
|
||||
compiler: clang++-10
|
||||
cxxstd: "03,11,14,17,2a"
|
||||
os: ubuntu-20.04
|
||||
- toolset: clang
|
||||
cxxstd: "03,11,14,17,2a"
|
||||
os: macos-10.15
|
||||
|
||||
runs-on: ${{matrix.os}}
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Install packages
|
||||
if: matrix.install
|
||||
run: sudo apt install ${{matrix.install}}
|
||||
|
||||
- name: Setup Boost
|
||||
run: |
|
||||
if [[ $(uname) =~ [Ll]inux ]]; then
|
||||
echo Installing locales for ${TRAVIS_OS_NAME} ...
|
||||
sudo /usr/sbin/locale-gen fr_FR
|
||||
sudo /usr/sbin/locale-gen en_GB
|
||||
sudo locale -a
|
||||
echo ...done with locales
|
||||
fi
|
||||
echo GITHUB_REPOSITORY: $GITHUB_REPOSITORY
|
||||
LIBRARY=${GITHUB_REPOSITORY#*/}
|
||||
echo LIBRARY: $LIBRARY
|
||||
echo "LIBRARY=$LIBRARY" >> $GITHUB_ENV
|
||||
echo GITHUB_BASE_REF: $GITHUB_BASE_REF
|
||||
echo GITHUB_REF: $GITHUB_REF
|
||||
REF=${GITHUB_BASE_REF:-$GITHUB_REF}
|
||||
REF=${REF#refs/heads/}
|
||||
echo REF: $REF
|
||||
BOOST_BRANCH=develop && [ "$REF" == "master" ] && BOOST_BRANCH=master || true
|
||||
echo BOOST_BRANCH: $BOOST_BRANCH
|
||||
cd ..
|
||||
git clone -b $BOOST_BRANCH --depth 1 https://github.com/boostorg/boost.git boost-root
|
||||
cd boost-root
|
||||
cp -r $GITHUB_WORKSPACE/* libs/$LIBRARY
|
||||
git submodule update --init tools/boostdep
|
||||
python tools/boostdep/depinst/depinst.py --git_args "--jobs 3" $LIBRARY
|
||||
./bootstrap.sh
|
||||
./b2 -d0 headers
|
||||
|
||||
- name: Create user-config.jam
|
||||
if: matrix.compiler
|
||||
run: |
|
||||
echo "using ${{matrix.toolset}} : : ${{matrix.compiler}} ;" > ~/user-config.jam
|
||||
|
||||
- name: Run tests
|
||||
run: |
|
||||
cd ../boost-root
|
||||
toolsets=$(sed 's/,/ /g' <<<"${{matrix.toolset}}")
|
||||
standards=$(sed 's/,/ /g' <<<"${{matrix.cxxstd}}")
|
||||
variants="debug release"
|
||||
err=0
|
||||
for toolset in ${toolsets} ; do
|
||||
for standard in ${standards} ; do
|
||||
for variant in ${variants} ; do
|
||||
if [[ err -ne 0 ]] ; then
|
||||
echo "skipping: ${toolset} ${standard} ${variant}"
|
||||
else
|
||||
echo "running: ${toolset} ${standard} ${variant}"
|
||||
./b2 -j3 libs/$LIBRARY/test toolset=${toolset} cxxstd=${standard} variant=${variant}
|
||||
err=$?
|
||||
fi
|
||||
done
|
||||
done
|
||||
done
|
||||
[[ $err -ne 0 ]] && false || true
|
||||
|
||||
windows:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- toolset: msvc-14.1
|
||||
cxxstd: "14,17,latest"
|
||||
addrmd: 32,64
|
||||
os: windows-2016
|
||||
cxxflags: ""
|
||||
- toolset: msvc-14.2
|
||||
cxxstd: "14,17,latest"
|
||||
addrmd: 32,64
|
||||
os: windows-2019
|
||||
cxxflags: ""
|
||||
- toolset: gcc
|
||||
cxxstd: "03,11,14,17,2a"
|
||||
addrmd: 64
|
||||
os: windows-2019
|
||||
cxxflags: "cxxflags=-Wa,-mbig-obj"
|
||||
|
||||
runs-on: ${{matrix.os}}
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Setup Boost
|
||||
shell: cmd
|
||||
run: |
|
||||
echo GITHUB_REPOSITORY: %GITHUB_REPOSITORY%
|
||||
for /f %%i in ("%GITHUB_REPOSITORY%") do set LIBRARY=%%~nxi
|
||||
echo LIBRARY: %LIBRARY%
|
||||
echo LIBRARY=%LIBRARY%>>%GITHUB_ENV%
|
||||
echo GITHUB_BASE_REF: %GITHUB_BASE_REF%
|
||||
echo GITHUB_REF: %GITHUB_REF%
|
||||
if "%GITHUB_BASE_REF%" == "" set GITHUB_BASE_REF=%GITHUB_REF%
|
||||
set BOOST_BRANCH=develop
|
||||
for /f %%i in ("%GITHUB_BASE_REF%") do if "%%~nxi" == "master" set BOOST_BRANCH=master
|
||||
echo BOOST_BRANCH: %BOOST_BRANCH%
|
||||
cd ..
|
||||
git clone -b %BOOST_BRANCH% --depth 1 https://github.com/boostorg/boost.git boost-root
|
||||
cd boost-root
|
||||
xcopy /s /e /q %GITHUB_WORKSPACE% libs\%LIBRARY%\
|
||||
git submodule update --init tools/boostdep
|
||||
python tools/boostdep/depinst/depinst.py --git_args "--jobs 3" %LIBRARY%
|
||||
cmd /c bootstrap
|
||||
b2 -d0 headers
|
||||
|
||||
- name: Run tests
|
||||
shell: bash
|
||||
run: |
|
||||
cd ../boost-root
|
||||
toolsets=$(sed 's/,/ /g' <<<"${{matrix.toolset}}")
|
||||
standards=$(sed 's/,/ /g' <<<"${{matrix.cxxstd}}")
|
||||
address_models=$(sed 's/,/ /g' <<<"${{matrix.addrmd}}")
|
||||
variants="debug release"
|
||||
err=0
|
||||
for toolset in ${toolsets} ; do
|
||||
for standard in ${standards} ; do
|
||||
for address_model in ${address_models} ; do
|
||||
for variant in ${variants} ; do
|
||||
if [[ err -ne 0 ]] ; then
|
||||
echo "skipping: ${toolset} ${standard} ${address_model} ${variant}"
|
||||
else
|
||||
echo "running: ${toolset} ${standard} ${address_model} ${variant}"
|
||||
./b2 -j3 ${{matrix.cxxflags}} libs/$LIBRARY/test toolset=${toolset} cxxstd=${standard} address-model=${address_model} variant=${variant}
|
||||
err=$?
|
||||
fi
|
||||
done
|
||||
done
|
||||
done
|
||||
done
|
||||
[[ $err -ne 0 ]] && false || true
|
||||
100
CMakeLists.txt
Normal file
100
CMakeLists.txt
Normal file
@@ -0,0 +1,100 @@
|
||||
#
|
||||
# Copyright (c) 2019 Vinnie Falco (vinnie.falco@gmail.com)
|
||||
# Copyright (c) 2021 Richard Hodges (hodges.r@gmail.com)
|
||||
#
|
||||
# Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
# file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
#
|
||||
# Official repository: https://github.com/boostorg/property_tree
|
||||
#
|
||||
|
||||
cmake_minimum_required(VERSION 3.5...3.19)
|
||||
|
||||
set(BOOST_PROPERTY_TREE_VERSION ${BOOST_SUPERPROJECT_VERSION})
|
||||
|
||||
project(boost_property_tree VERSION "${BOOST_PROPERTY_TREE_VERSION}" LANGUAGES CXX)
|
||||
|
||||
option(BOOST_PROPERTY_TREE_BUILD_TESTS "Build boost::property_tree tests" ${BUILD_TESTING})
|
||||
option(BOOST_PROPERTY_TREE_BUILD_EXAMPLES "Build boost::property_tree examples" ${BOOST_PROPERTY_TREE_BUILD_TESTS})
|
||||
|
||||
file(GLOB_RECURSE BOOST_PROPERTY_TREE_HEADERS $<$<VERSION_GREATER_EQUAL:${CMAKE_VERSION},3.12>:CONFIGURE_DEPENDS>
|
||||
include/boost/*.hpp
|
||||
include/boost/*.ipp
|
||||
include/boost/*.natvis
|
||||
)
|
||||
|
||||
set(BOOST_PROPERTY_TREE_SOURCES
|
||||
)
|
||||
|
||||
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
|
||||
|
||||
source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR}/include/boost PREFIX "" FILES ${BOOST_PROPERTY_TREE_HEADERS})
|
||||
source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR}/src PREFIX "" FILES ${BOOST_PROPERTY_TREE_SOURCES})
|
||||
|
||||
add_library(boost_property_tree INTERFACE)
|
||||
add_library(Boost::property_tree ALIAS boost_property_tree)
|
||||
|
||||
target_include_directories(boost_property_tree INTERFACE include)
|
||||
|
||||
if(BOOST_SUPERPROJECT_VERSION)
|
||||
#
|
||||
# Building as part of Boost superproject tree, with Boost as dependency.
|
||||
#
|
||||
target_link_libraries(boost_property_tree
|
||||
INTERFACE
|
||||
Boost::any
|
||||
Boost::assert
|
||||
Boost::bind
|
||||
Boost::config
|
||||
Boost::core
|
||||
Boost::format
|
||||
Boost::iterator
|
||||
Boost::mpl
|
||||
Boost::multi_index
|
||||
Boost::optional
|
||||
Boost::range
|
||||
Boost::serialization
|
||||
Boost::static_assert
|
||||
Boost::throw_exception
|
||||
Boost::type_traits
|
||||
)
|
||||
|
||||
elseif(BOOST_PROPERTY_TREE_IN_BOOST_TREE)
|
||||
#
|
||||
# Building inside Boost tree, out of Boost superproject tree, with Boost as dependency.
|
||||
# e.g. on Travis or other CI, or when producing Visual Studio Solution and Projects.
|
||||
#
|
||||
get_filename_component(BOOST_ROOT ../.. ABSOLUTE)
|
||||
set(BOOST_INCLUDEDIR ${BOOST_ROOT})
|
||||
set(BOOST_LIBRARYDIR ${BOOST_ROOT}/stage/lib)
|
||||
find_package(Boost COMPONENTS serialization REQUIRED)
|
||||
|
||||
target_include_directories(boost_property_tree INTERFACE ${BOOST_ROOT})
|
||||
target_link_directories(boost_property_tree INTERFACE ${BOOST_ROOT}/stage/lib)
|
||||
|
||||
else()
|
||||
#
|
||||
# Building out of Boost tree, out of Boost superproject tree, with Boost as dependency.
|
||||
# e.g. for packaging or added with add_subdirectory.
|
||||
#
|
||||
find_package(Boost REQUIRED
|
||||
#COMPONENTS container system
|
||||
)
|
||||
target_link_libraries(boost_property_tree
|
||||
INTERFACE
|
||||
Boost::boost
|
||||
)
|
||||
endif()
|
||||
|
||||
if(BUILD_TESTING)
|
||||
include(CTest)
|
||||
add_subdirectory(test)
|
||||
endif()
|
||||
|
||||
if(BOOST_PROPERTY_TREE_BUILD_EXAMPLES)
|
||||
if (BOOST_SUPERPROJECT_VERSION)
|
||||
message(STATUS "[property_tree] superproject build - skipping examples")
|
||||
else()
|
||||
add_subdirectory(examples)
|
||||
endif()
|
||||
endif()
|
||||
22
README.md
Normal file
22
README.md
Normal file
@@ -0,0 +1,22 @@
|
||||
# Maintainer
|
||||
|
||||
This library is currently maintained by [Richard Hodges](mailto:hodges.r@gmail.com) with generous support
|
||||
from the C++ Alliance.
|
||||
|
||||
# Build Status
|
||||
|
||||
Branch | Status
|
||||
--------|-------
|
||||
develop | [](https://github.com/boostorg/property_tree/actions/workflows/ci.yml)
|
||||
master | [](https://github.com/boostorg/property_tree/actions/workflows/ci.yml)
|
||||
|
||||
# Licence
|
||||
|
||||
This software is distributed under the [Boost Software License, Version 1.0](http://www.boost.org/LICENSE_1_0.txt).
|
||||
|
||||
# Original Work
|
||||
|
||||
This library is the work of Marcin Kalicinski and Sebastian Redl<br/>
|
||||
|
||||
Copyright (C) 2002-2006 Marcin Kalicinski<br/>
|
||||
Copyright (C) 2009 Sebastian Redl
|
||||
6
cmake/config.cmake.in
Normal file
6
cmake/config.cmake.in
Normal file
@@ -0,0 +1,6 @@
|
||||
@PACKAGE_INIT@
|
||||
|
||||
include(CMakeFindDependencyMacro)
|
||||
find_dependency(Boost REQUIRED ) #COMPONENTS container system)
|
||||
|
||||
include("${CMAKE_CURRENT_LIST_DIR}/boost_property_tree-targets.cmake")
|
||||
57
examples/CMakeLists.txt
Normal file
57
examples/CMakeLists.txt
Normal file
@@ -0,0 +1,57 @@
|
||||
#
|
||||
# Copyright (c) 2019 Vinnie Falco (vinnie.falco@gmail.com)
|
||||
# Copyright (c) 2021 Richard Hodges (hodges.r@gmail.com)
|
||||
#
|
||||
# Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
# file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
#
|
||||
# Official repository: https://github.com/boostorg/json
|
||||
#
|
||||
|
||||
source_group("test" FILES
|
||||
custom_data_type.cpp
|
||||
debug_settings.cpp
|
||||
empty_ptree_trick.cpp
|
||||
info_grammar_spirit.cpp
|
||||
speed_test.cpp
|
||||
)
|
||||
|
||||
#
|
||||
|
||||
add_executable(custom_data_type
|
||||
custom_data_type.cpp
|
||||
)
|
||||
set_property(TARGET custom_data_type PROPERTY FOLDER "example")
|
||||
target_link_libraries(custom_data_type PRIVATE Boost::property_tree)
|
||||
|
||||
#
|
||||
|
||||
add_executable(debug_settings
|
||||
debug_settings.cpp
|
||||
)
|
||||
set_property(TARGET debug_settings PROPERTY FOLDER "example")
|
||||
target_link_libraries(debug_settings PRIVATE Boost::property_tree)
|
||||
|
||||
#
|
||||
|
||||
add_executable(empty_ptree_trick
|
||||
empty_ptree_trick.cpp
|
||||
)
|
||||
set_property(TARGET empty_ptree_trick PROPERTY FOLDER "example")
|
||||
target_link_libraries(empty_ptree_trick PRIVATE Boost::property_tree)
|
||||
|
||||
#
|
||||
|
||||
add_executable(info_grammar_spirit
|
||||
info_grammar_spirit.cpp
|
||||
)
|
||||
set_property(TARGET info_grammar_spirit PROPERTY FOLDER "example")
|
||||
target_link_libraries(info_grammar_spirit PRIVATE Boost::property_tree)
|
||||
|
||||
#
|
||||
|
||||
add_executable(speed_test
|
||||
speed_test.cpp
|
||||
)
|
||||
set_property(TARGET speed_test PROPERTY FOLDER "example")
|
||||
target_link_libraries(speed_test PRIVATE Boost::property_tree)
|
||||
@@ -16,13 +16,15 @@
|
||||
|
||||
using namespace boost::property_tree;
|
||||
|
||||
// Process settings using empty ptree trick. Note that it is considerably simpler
|
||||
static ptree dflt;
|
||||
|
||||
// Process settings using empty ptree trick. Note that it is considerably simpler
|
||||
// than version which does not use the "trick"
|
||||
void process_settings(const std::string &filename)
|
||||
{
|
||||
ptree pt;
|
||||
read_info(filename, pt);
|
||||
const ptree &settings = pt.get_child("settings", empty_ptree<ptree>());
|
||||
read_info(filename, pt);
|
||||
const ptree &settings = pt.get_child("settings", dflt);
|
||||
std::cout << "\n Processing " << filename << std::endl;
|
||||
std::cout << " Setting 1 is " << settings.get("setting1", 0) << std::endl;
|
||||
std::cout << " Setting 2 is " << settings.get("setting2", 0.0) << std::endl;
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
"Data"
|
||||
],
|
||||
"maintainers": [
|
||||
"Sebastian Redl <sebastian.redl -at- getdesigned.at>"
|
||||
]
|
||||
"Richard Hodges <hodges.r@gmail.com>"
|
||||
],
|
||||
"cxxstd": "03"
|
||||
}
|
||||
|
||||
82
test/CMakeLists.txt
Normal file
82
test/CMakeLists.txt
Normal file
@@ -0,0 +1,82 @@
|
||||
#
|
||||
# Copyright (c) 2019 Vinnie Falco (vinnie.falco@gmail.com)
|
||||
# Copyright (c) 2021 Richard Hodges (hodges.r@gmail.com)
|
||||
#
|
||||
# Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
# file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
#
|
||||
# Official repository: https://github.com/boostorg/json
|
||||
#
|
||||
|
||||
file(GLOB_RECURSE BOOST_PROPERTY_TREE_TESTS_FILES CONFIGURE_DEPENDS Jamfile *.cpp *.hpp)
|
||||
list(FILTER BOOST_PROPERTY_TREE_TESTS_FILES EXCLUDE REGEX "^${CMAKE_CURRENT_SOURCE_DIR}/cmake_install_test/.*$")
|
||||
|
||||
source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR} PREFIX "" FILES ${BOOST_PROPERTY_TREE_TESTS_FILES})
|
||||
|
||||
macro(PTREE_TEST name)
|
||||
add_executable("${name}" ${ARGN})
|
||||
target_include_directories("${name}" PRIVATE .)
|
||||
target_link_libraries("${name}" PRIVATE Boost::property_tree Boost::serialization)
|
||||
add_test(NAME "property_tree-${name}" COMMAND "${name}")
|
||||
endmacro()
|
||||
|
||||
PTREE_TEST(test-multi test_multi_module1.cpp test_multi_module2.cpp)
|
||||
PTREE_TEST(test-property-tree test_property_tree.cpp test_property_tree.hpp)
|
||||
PTREE_TEST(test-info-parser test_info_parser.cpp)
|
||||
PTREE_TEST(test-json-parser test_json_parser.cpp)
|
||||
PTREE_TEST(test-json-parser2 test_json_parser2.cpp)
|
||||
PTREE_TEST(test-ini-parser test_ini_parser.cpp)
|
||||
PTREE_TEST(test-xml-parser-rapidxml test_xml_parser_rapidxml.cpp)
|
||||
|
||||
#[[
|
||||
add_executable(tests ${BOOST_PROPERTY_TREE_TESTS_FILES})
|
||||
target_include_directories(tests PRIVATE .)
|
||||
target_link_libraries(tests PRIVATE Boost::property_tree Boost::serialization Boost::unit_test_framework)
|
||||
add_test(NAME property_tree-tests COMMAND tests)
|
||||
]]
|
||||
|
||||
#[[
|
||||
source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR} PREFIX "" FILES limits.cpp main.cpp)
|
||||
source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR}/../src PREFIX "" FILES ../src/src.cpp)
|
||||
add_executable(limits limits.cpp main.cpp ../src/src.cpp Jamfile)
|
||||
|
||||
target_compile_features(limits PUBLIC cxx_constexpr)
|
||||
|
||||
target_include_directories(limits PRIVATE ../include .)
|
||||
target_compile_definitions(limits PRIVATE
|
||||
BOOST_PROPERTY_TREE_MAX_STRING_SIZE=1000
|
||||
BOOST_PROPERTY_TREE_MAX_STRUCTURED_SIZE=20
|
||||
BOOST_PROPERTY_TREE_STACK_BUFFER_SIZE=256
|
||||
BOOST_PROPERTY_TREE_NO_LIB=1
|
||||
)
|
||||
]]
|
||||
|
||||
if(BOOST_SUPERPROJECT_VERSION)
|
||||
#[[
|
||||
target_link_libraries(limits
|
||||
PRIVATE
|
||||
Boost::align
|
||||
Boost::assert
|
||||
Boost::config
|
||||
Boost::container
|
||||
Boost::exception
|
||||
Boost::system
|
||||
Boost::throw_exception
|
||||
Boost::utility
|
||||
)
|
||||
]]
|
||||
elseif(BOOST_PROPERTY_TREE_IN_BOOST_TREE)
|
||||
#[[
|
||||
target_include_directories(limits PRIVATE ${BOOST_ROOT})
|
||||
target_link_directories(limits PRIVATE ${BOOST_ROOT}/stage/lib)
|
||||
]]
|
||||
else()
|
||||
#[[
|
||||
target_link_libraries(limits
|
||||
PRIVATE
|
||||
Boost::system
|
||||
Boost::container
|
||||
)
|
||||
]]
|
||||
endif()
|
||||
|
||||
@@ -19,7 +19,7 @@ test-suite "property_tree"
|
||||
: [ run test_property_tree.cpp /boost/serialization//boost_serialization ]
|
||||
[ run test_info_parser.cpp ]
|
||||
[ run test_json_parser.cpp ]
|
||||
[ run test_json_parser2.cpp /boost/test//boost_unit_test_framework ]
|
||||
[ run test_json_parser2.cpp ]
|
||||
[ run test_ini_parser.cpp ]
|
||||
[ run test_xml_parser_rapidxml.cpp ]
|
||||
|
||||
|
||||
@@ -229,14 +229,14 @@ void test_info_parser()
|
||||
Ptree pt, default_pt;
|
||||
pt.put_value(1);
|
||||
default_pt.put_value(2);
|
||||
BOOST_CHECK(pt != default_pt);
|
||||
BOOST_TEST(pt != default_pt);
|
||||
read_info("nonexisting file.nonexisting file", pt, default_pt);
|
||||
BOOST_CHECK(pt == default_pt);
|
||||
BOOST_TEST(pt == default_pt);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
int test_main(int argc, char *argv[])
|
||||
int main()
|
||||
{
|
||||
using namespace boost::property_tree;
|
||||
test_info_parser<ptree>();
|
||||
@@ -245,5 +245,5 @@ int test_main(int argc, char *argv[])
|
||||
test_info_parser<wptree>();
|
||||
test_info_parser<wiptree>();
|
||||
#endif
|
||||
return 0;
|
||||
return boost::report_errors();
|
||||
}
|
||||
|
||||
@@ -204,12 +204,12 @@ void test_other_trees()
|
||||
s.seekg(0, std::ios_base::beg);
|
||||
ptree result;
|
||||
read_ini(s, result);
|
||||
BOOST_CHECK(result.get("section.innerkey", "bad") == "v1");
|
||||
BOOST_CHECK(result.get("nosection", "bad") == "v2");
|
||||
BOOST_TEST(result.get("section.innerkey", "bad") == "v1");
|
||||
BOOST_TEST(result.get("nosection", "bad") == "v2");
|
||||
}
|
||||
}
|
||||
|
||||
int test_main(int argc, char *argv[])
|
||||
int main()
|
||||
{
|
||||
test_ini_parser<ptree>();
|
||||
test_ini_parser<iptree>();
|
||||
@@ -221,6 +221,6 @@ int test_main(int argc, char *argv[])
|
||||
test_unmappable_trees();
|
||||
test_other_trees();
|
||||
|
||||
return 0;
|
||||
return boost::report_errors();
|
||||
|
||||
}
|
||||
|
||||
@@ -411,24 +411,24 @@ void test_escaping_utf8()
|
||||
std::string str = "\xD0\x9C\xD0\xB0\xD0\xBC\xD0\xB0 "
|
||||
"\xD0\xBC\xD1\x8B\xD0\xBB\xD0\xB0 \xD1\x80\xD0\xB0\xD0\xBC\xD1\x83";
|
||||
// Should NOT escape UTF-8
|
||||
BOOST_CHECK(boost::property_tree::json_parser::create_escapes(str) == str);
|
||||
BOOST_TEST(boost::property_tree::json_parser::create_escapes(str) == str);
|
||||
}
|
||||
|
||||
void test_escaping_wide()
|
||||
{
|
||||
// Should NOT escape characters within ASCII range.
|
||||
std::wstring str1 = L"I am wstring with ASCII";
|
||||
BOOST_CHECK(boost::property_tree::json_parser::create_escapes(str1) == str1);
|
||||
BOOST_TEST(boost::property_tree::json_parser::create_escapes(str1) == str1);
|
||||
// Should escape characters outside ASCII range - this is NOT utf-8
|
||||
// This is cyrillic text
|
||||
std::wstring str2 = L"\u041C\u0430\u043C\u0430 "
|
||||
L"\u043C\u044B\u043B\u0430 \u0440\u0430\u043C\u0443";
|
||||
BOOST_CHECK(boost::property_tree::json_parser::create_escapes(str2) ==
|
||||
BOOST_TEST(boost::property_tree::json_parser::create_escapes(str2) ==
|
||||
L"\\u041C\\u0430\\u043C\\u0430 "
|
||||
L"\\u043C\\u044B\\u043B\\u0430 \\u0440\\u0430\\u043C\\u0443");
|
||||
}
|
||||
|
||||
int test_main(int argc, char *argv[])
|
||||
int main(int , char *[])
|
||||
{
|
||||
using namespace boost::property_tree;
|
||||
test_json_parser<ptree>();
|
||||
@@ -439,5 +439,5 @@ int test_main(int argc, char *argv[])
|
||||
test_json_parser<wiptree>();
|
||||
test_escaping_wide();
|
||||
#endif
|
||||
return 0;
|
||||
return boost::report_errors();
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -12,7 +12,6 @@
|
||||
#include <boost/range.hpp>
|
||||
#include <list>
|
||||
#include <cmath>
|
||||
#include <iostream>
|
||||
|
||||
// If using VC, disable some warnings that trip in boost::serialization bowels
|
||||
#ifdef BOOST_MSVC
|
||||
@@ -166,7 +165,7 @@ void run_tests(Ptree* pt)
|
||||
test_leaks(pt); // must be a final test
|
||||
}
|
||||
|
||||
int test_main(int, char *[])
|
||||
int main(int, char *[])
|
||||
{
|
||||
|
||||
using namespace boost::property_tree;
|
||||
@@ -199,5 +198,5 @@ int test_main(int, char *[])
|
||||
}
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
return boost::report_errors();
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -18,7 +18,7 @@
|
||||
# define _CRT_SECURE_NO_DEPRECATE
|
||||
#endif
|
||||
|
||||
#include <boost/test/minimal.hpp>
|
||||
#include <boost/core/lightweight_test.hpp>
|
||||
#include <boost/property_tree/detail/ptree_utils.hpp>
|
||||
#include <fstream>
|
||||
#include <cstring>
|
||||
@@ -65,7 +65,7 @@ public:
|
||||
std::ofstream stream(name.c_str());
|
||||
using namespace std;
|
||||
stream.write(test_data, strlen(test_data));
|
||||
BOOST_CHECK(stream.good());
|
||||
BOOST_TEST(stream.good());
|
||||
}
|
||||
}
|
||||
~test_file()
|
||||
@@ -116,7 +116,7 @@ void generic_parser_test(Ptree &pt,
|
||||
rf(filename_out, pt2); // Read file again
|
||||
|
||||
// Compare original with read
|
||||
BOOST_CHECK(pt == pt2);
|
||||
BOOST_TEST(pt == pt2);
|
||||
|
||||
}
|
||||
|
||||
@@ -160,9 +160,9 @@ void generic_parser_test_ok(ReadFunc rf,
|
||||
std::cerr << "Sizes: " << (unsigned)::total_size(pt) << ", " << (unsigned)::total_data_size(pt) << ", " << (unsigned)::total_keys_size(pt) << "\n";
|
||||
|
||||
// Check total sizes
|
||||
BOOST_CHECK(actual_total_size == total_size);
|
||||
BOOST_CHECK(actual_data_size == total_data_size);
|
||||
BOOST_CHECK(actual_keys_size == total_keys_size);
|
||||
BOOST_TEST(actual_total_size == total_size);
|
||||
BOOST_TEST(actual_data_size == total_data_size);
|
||||
BOOST_TEST(actual_keys_size == total_keys_size);
|
||||
|
||||
}
|
||||
catch (std::runtime_error &e)
|
||||
@@ -205,8 +205,8 @@ void generic_parser_test_error(ReadFunc rf,
|
||||
}
|
||||
catch (Error &e)
|
||||
{
|
||||
BOOST_CHECK(e.line() == expected_error_line); // Test line number
|
||||
BOOST_CHECK(pt == get_test_ptree<Ptree>()); // Test if error damaged contents
|
||||
BOOST_TEST(e.line() == expected_error_line); // Test line number
|
||||
BOOST_TEST(pt == get_test_ptree<Ptree>()); // Test if error damaged contents
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
@@ -246,7 +246,7 @@ void check_exact_roundtrip(ReadFunc rf, WriteFunc wf, const char *test_data) {
|
||||
std::cerr << "(progress) Roundtripped data:\n";
|
||||
errstream<Ch>() << out_stream.str();
|
||||
std::cerr << "\n-----\n";
|
||||
BOOST_CHECK(native_test_data == out_stream.str());
|
||||
BOOST_TEST(native_test_data == out_stream.str());
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
#include <boost/detail/utf8_codecvt_facet.hpp>
|
||||
#include <boost/detail/utf8_codecvt_facet.ipp>
|
||||
|
||||
int test_main(int argc, char *argv[])
|
||||
int main(int , char *[])
|
||||
{
|
||||
using namespace boost::property_tree;
|
||||
test_xml_parser<ptree>();
|
||||
@@ -30,5 +30,5 @@ int test_main(int argc, char *argv[])
|
||||
test_xml_parser<wptree>();
|
||||
test_xml_parser<wiptree>();
|
||||
#endif
|
||||
return 0;
|
||||
return boost::report_errors();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user