forked from boostorg/array
Compare commits
22 Commits
boost-1.64
...
esp-idf-co
Author | SHA1 | Date | |
---|---|---|---|
70088f5d6c | |||
a9a3dbbc41 | |||
e384e3780b | |||
63f83dc350 | |||
37c18b3094 | |||
42d974e5df | |||
1572eac629 | |||
0db8c56d3f | |||
674234d401 | |||
427c8fad2f | |||
f0e79b8ebc | |||
d026fbcee3 | |||
92f66a9f14 | |||
e329330031 | |||
32b074c9ae | |||
453cf59eb9 | |||
520d8987f7 | |||
b279a9005b | |||
854215e54c | |||
ee03e0bae8 | |||
e5f4af3dd2 | |||
85e33cd138 |
37
.drone.star
Normal file
37
.drone.star
Normal file
@ -0,0 +1,37 @@
|
||||
# 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={}
|
||||
linuxglobalimage="cppalliance/droneubuntu1604:1"
|
||||
windowsglobalimage="cppalliance/dronevs2019"
|
||||
|
||||
def main(ctx):
|
||||
return [
|
||||
linux_cxx("TEST_CMAKE=TRUE Job 0", "g++", packages="", buildtype="96ad197d74-2319b6d45f", image=linuxglobalimage, environment={'TEST_CMAKE': 'TRUE', 'DRONE_JOB_UUID': 'b6589fc6ab'}, globalenv=globalenv),
|
||||
linux_cxx("TOOLSET=gcc COMPILER=g++ CXXSTD=03,11 Job 1", "g++", packages="", buildtype="boost", image=linuxglobalimage, environment={'TOOLSET': 'gcc', 'COMPILER': 'g++', 'CXXSTD': '03,11', 'DRONE_JOB_UUID': '356a192b79'}, globalenv=globalenv),
|
||||
linux_cxx("TOOLSET=gcc COMPILER=g++-4.7 CXXSTD=03,11 Job 2", "g++-4.7", packages="g++-4.7", buildtype="boost", image=linuxglobalimage, environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-4.7', 'CXXSTD': '03,11', 'DRONE_JOB_UUID': 'da4b9237ba'}, globalenv=globalenv),
|
||||
linux_cxx("TOOLSET=gcc COMPILER=g++-4.8 CXXSTD=03,11 Job 3", "g++-4.8", packages="g++-4.8", buildtype="boost", image=linuxglobalimage, environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-4.8', 'CXXSTD': '03,11', 'DRONE_JOB_UUID': '77de68daec'}, globalenv=globalenv),
|
||||
linux_cxx("TOOLSET=gcc COMPILER=g++-4.9 CXXSTD=03,11 Job 4", "g++-4.9", packages="g++-4.9", buildtype="boost", image=linuxglobalimage, environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-4.9', 'CXXSTD': '03,11', 'DRONE_JOB_UUID': '1b64538924'}, globalenv=globalenv),
|
||||
linux_cxx("TOOLSET=gcc COMPILER=g++-5 CXXSTD=03,11,14,1z Job 5", "g++-5", packages="g++-5", buildtype="boost", image=linuxglobalimage, environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-5', 'CXXSTD': '03,11,14,1z', 'DRONE_JOB_UUID': 'ac3478d69a'}, globalenv=globalenv),
|
||||
linux_cxx("TOOLSET=gcc COMPILER=g++-6 CXXSTD=03,11,14,1z Job 6", "g++-6", packages="g++-6", buildtype="boost", image=linuxglobalimage, environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-6', 'CXXSTD': '03,11,14,1z', 'DRONE_JOB_UUID': 'c1dfd96eea'}, globalenv=globalenv),
|
||||
linux_cxx("TOOLSET=gcc COMPILER=g++-7 CXXSTD=03,11,14,17 Job 7", "g++-7", packages="g++-7", buildtype="boost", image="cppalliance/droneubuntu1404:1", environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-7', 'CXXSTD': '03,11,14,17', 'DRONE_JOB_UUID': '902ba3cda1'}, globalenv=globalenv),
|
||||
linux_cxx("TOOLSET=clang COMPILER=clang++ CXXSTD=03,11 Job 8", "clang++", packages="", buildtype="boost", image=linuxglobalimage, environment={'TOOLSET': 'clang', 'COMPILER': 'clang++', 'CXXSTD': '03,11', 'DRONE_JOB_UUID': 'fe5dbbcea5'}, globalenv=globalenv),
|
||||
linux_cxx("TOOLSET=clang COMPILER=clang++-3.5 CXXSTD=03, Job 9", "clang++", packages="clang-3.5 libstdc++-4.9-dev", llvm_os="precise", llvm_ver="3.5", buildtype="boost", image=linuxglobalimage, environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-3.5', 'CXXSTD': '03,11,14,1z', 'DRONE_JOB_UUID': '0ade7c2cf9'}, globalenv=globalenv),
|
||||
linux_cxx("TOOLSET=clang COMPILER=clang++-3.6 CXXSTD=03, Job 10", "clang++", packages="clang-3.6", llvm_os="precise", llvm_ver="3.6", buildtype="boost", image=linuxglobalimage, environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-3.6', 'CXXSTD': '03,11,14,1z', 'DRONE_JOB_UUID': 'b1d5781111'}, globalenv=globalenv),
|
||||
linux_cxx("TOOLSET=clang COMPILER=clang++-3.7 CXXSTD=03, Job 11", "clang++", packages="clang-3.7", llvm_os="precise", llvm_ver="3.7", buildtype="boost", image=linuxglobalimage, environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-3.7', 'CXXSTD': '03,11,14,1z', 'DRONE_JOB_UUID': '17ba079149'}, globalenv=globalenv),
|
||||
linux_cxx("TOOLSET=clang COMPILER=clang++-3.8 CXXSTD=03, Job 12", "clang++-3.8", packages="clang-3.8 libstdc++-4.9-dev", llvm_os="precise", llvm_ver="3.8", buildtype="boost", image=linuxglobalimage, environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-3.8', 'CXXSTD': '03,11,14,1z', 'DRONE_JOB_UUID': '7b52009b64'}, globalenv=globalenv),
|
||||
linux_cxx("TOOLSET=clang COMPILER=clang++-3.9 CXXSTD=03, Job 13", "clang++-3.9", packages="clang-3.9 libstdc++-4.9-dev", llvm_os="precise", llvm_ver="3.9", buildtype="boost", image=linuxglobalimage, environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-3.9', 'CXXSTD': '03,11,14,1z', 'DRONE_JOB_UUID': 'bd307a3ec3'}, globalenv=globalenv),
|
||||
linux_cxx("TOOLSET=clang COMPILER=clang++-4.0 CXXSTD=03, Job 14", "clang++-4.0", packages="clang-4.0", llvm_os="xenial", llvm_ver="4.0", buildtype="boost", image=linuxglobalimage, environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-4.0', 'CXXSTD': '03,11,14,1z', 'DRONE_JOB_UUID': 'fa35e19212'}, globalenv=globalenv),
|
||||
linux_cxx("TOOLSET=clang COMPILER=clang++-5.0 CXXSTD=03, Job 15", "clang++-5.0", packages="clang-5.0", llvm_os="xenial", llvm_ver="5.0", buildtype="boost", image=linuxglobalimage, environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-5.0', 'CXXSTD': '03,11,14,1z', 'DRONE_JOB_UUID': 'f1abd67035'}, globalenv=globalenv),
|
||||
osx_cxx("TOOLSET=clang COMPILER=clang++ CXXSTD=03,11,1 Job 16", "clang++", packages="", buildtype="boost", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++', 'CXXSTD': '03,11,14,1z', 'DRONE_JOB_UUID': '1574bddb75'}, globalenv=globalenv),
|
||||
]
|
||||
|
||||
# from https://github.com/boostorg/boost-ci
|
||||
load("@boost_ci//ci/drone/:functions.star", "linux_cxx","windows_cxx","osx_cxx","freebsd_cxx")
|
37
.drone/96ad197d74-2319b6d45f.sh
Executable file
37
.drone/96ad197d74-2319b6d45f.sh
Executable file
@ -0,0 +1,37 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -ex
|
||||
export TRAVIS_BUILD_DIR=$(pwd)
|
||||
export DRONE_BUILD_DIR=$(pwd)
|
||||
export TRAVIS_BRANCH=$DRONE_BRANCH
|
||||
export VCS_COMMIT_ID=$DRONE_COMMIT
|
||||
export GIT_COMMIT=$DRONE_COMMIT
|
||||
export REPO_NAME=$DRONE_REPO
|
||||
export PATH=~/.local/bin:/usr/local/bin:$PATH
|
||||
|
||||
echo '==================================> BEFORE_INSTALL'
|
||||
|
||||
. .drone/before-install.sh
|
||||
|
||||
echo '==================================> INSTALL'
|
||||
|
||||
BOOST_BRANCH=develop && [ "$TRAVIS_BRANCH" == "master" ] && BOOST_BRANCH=master || true
|
||||
git clone -b $BOOST_BRANCH --depth 1 https://github.com/boostorg/assert.git ../assert
|
||||
git clone -b $BOOST_BRANCH --depth 1 https://github.com/boostorg/config.git ../config
|
||||
git clone -b $BOOST_BRANCH --depth 1 https://github.com/boostorg/core.git ../core
|
||||
git clone -b $BOOST_BRANCH --depth 1 https://github.com/boostorg/static_assert.git ../static_assert
|
||||
git clone -b $BOOST_BRANCH --depth 1 https://github.com/boostorg/throw_exception.git ../throw_exception
|
||||
|
||||
echo '==================================> BEFORE_SCRIPT'
|
||||
|
||||
. $DRONE_BUILD_DIR/.drone/before-script.sh
|
||||
|
||||
echo '==================================> SCRIPT'
|
||||
|
||||
mkdir __build__ && cd __build__
|
||||
cmake ../test/test_cmake
|
||||
cmake --build .
|
||||
|
||||
echo '==================================> AFTER_SUCCESS'
|
||||
|
||||
. $DRONE_BUILD_DIR/.drone/after-success.sh
|
3
.drone/after-success.sh
Executable file
3
.drone/after-success.sh
Executable file
@ -0,0 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
|
3
.drone/before-install.sh
Executable file
3
.drone/before-install.sh
Executable file
@ -0,0 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
|
3
.drone/before-script.sh
Executable file
3
.drone/before-script.sh
Executable file
@ -0,0 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
|
41
.drone/boost.sh
Executable file
41
.drone/boost.sh
Executable file
@ -0,0 +1,41 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -ex
|
||||
export TRAVIS_BUILD_DIR=$(pwd)
|
||||
export DRONE_BUILD_DIR=$(pwd)
|
||||
export TRAVIS_BRANCH=$DRONE_BRANCH
|
||||
export VCS_COMMIT_ID=$DRONE_COMMIT
|
||||
export GIT_COMMIT=$DRONE_COMMIT
|
||||
export REPO_NAME=$DRONE_REPO
|
||||
export PATH=~/.local/bin:/usr/local/bin:$PATH
|
||||
|
||||
echo '==================================> BEFORE_INSTALL'
|
||||
|
||||
. .drone/before-install.sh
|
||||
|
||||
echo '==================================> INSTALL'
|
||||
|
||||
BOOST_BRANCH=develop && [ "$TRAVIS_BRANCH" == "master" ] && BOOST_BRANCH=master || true
|
||||
cd ..
|
||||
git clone -b $BOOST_BRANCH --depth 1 https://github.com/boostorg/boost.git boost-root
|
||||
cd boost-root
|
||||
git submodule update --init tools/build
|
||||
git submodule update --init libs/config
|
||||
git submodule update --init tools/boostdep
|
||||
cp -r $TRAVIS_BUILD_DIR/* libs/array
|
||||
python tools/boostdep/depinst/depinst.py array
|
||||
./bootstrap.sh
|
||||
./b2 headers
|
||||
|
||||
echo '==================================> BEFORE_SCRIPT'
|
||||
|
||||
. $DRONE_BUILD_DIR/.drone/before-script.sh
|
||||
|
||||
echo '==================================> SCRIPT'
|
||||
|
||||
echo "using $TOOLSET : : $COMPILER ;" > ~/user-config.jam
|
||||
./b2 -j 3 libs/array/test toolset=$TOOLSET cxxstd=$CXXSTD
|
||||
|
||||
echo '==================================> AFTER_SUCCESS'
|
||||
|
||||
. $DRONE_BUILD_DIR/.drone/after-success.sh
|
421
.github/workflows/ci.yml
vendored
Normal file
421
.github/workflows/ci.yml
vendored
Normal file
@ -0,0 +1,421 @@
|
||||
name: GitHub Actions CI
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
- develop
|
||||
- githubactions*
|
||||
- feature/**
|
||||
- fix/**
|
||||
- pr/**
|
||||
|
||||
jobs:
|
||||
posix:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- name: "TEST_CMAKE=TRUE Job 0"
|
||||
buildtype: "96ad197d74-2319b6d45f"
|
||||
packages: ""
|
||||
packages_to_remove: ""
|
||||
os: "ubuntu-20.04"
|
||||
container: "ubuntu:16.04"
|
||||
cxx: "g++"
|
||||
sources: ""
|
||||
llvm_os: ""
|
||||
llvm_ver: ""
|
||||
test_cmake: "TRUE"
|
||||
- name: "TOOLSET=gcc COMPILER=g++ CXXSTD=03,11 Job 1"
|
||||
buildtype: "boost"
|
||||
packages: ""
|
||||
packages_to_remove: ""
|
||||
os: "ubuntu-20.04"
|
||||
container: "ubuntu:16.04"
|
||||
cxx: "g++"
|
||||
sources: ""
|
||||
llvm_os: ""
|
||||
llvm_ver: ""
|
||||
toolset: "gcc"
|
||||
compiler: "g++"
|
||||
cxxstd: "03,11"
|
||||
- name: "TOOLSET=gcc COMPILER=g++-4.7 CXXSTD=03,11 Job 2"
|
||||
buildtype: "boost"
|
||||
packages: "g++-4.7"
|
||||
packages_to_remove: ""
|
||||
os: "ubuntu-20.04"
|
||||
container: "ubuntu:16.04"
|
||||
cxx: "g++-4.7"
|
||||
sources: ""
|
||||
llvm_os: ""
|
||||
llvm_ver: ""
|
||||
toolset: "gcc"
|
||||
compiler: "g++-4.7"
|
||||
cxxstd: "03,11"
|
||||
- name: "TOOLSET=gcc COMPILER=g++-4.8 CXXSTD=03,11 Job 3"
|
||||
buildtype: "boost"
|
||||
packages: "g++-4.8"
|
||||
packages_to_remove: ""
|
||||
os: "ubuntu-20.04"
|
||||
container: "ubuntu:16.04"
|
||||
cxx: "g++-4.8"
|
||||
sources: ""
|
||||
llvm_os: ""
|
||||
llvm_ver: ""
|
||||
toolset: "gcc"
|
||||
compiler: "g++-4.8"
|
||||
cxxstd: "03,11"
|
||||
- name: "TOOLSET=gcc COMPILER=g++-4.9 CXXSTD=03,11 Job 4"
|
||||
buildtype: "boost"
|
||||
packages: "g++-4.9"
|
||||
packages_to_remove: ""
|
||||
os: "ubuntu-20.04"
|
||||
container: "ubuntu:16.04"
|
||||
cxx: "g++-4.9"
|
||||
sources: ""
|
||||
llvm_os: ""
|
||||
llvm_ver: ""
|
||||
toolset: "gcc"
|
||||
compiler: "g++-4.9"
|
||||
cxxstd: "03,11"
|
||||
- name: "TOOLSET=gcc COMPILER=g++-5 CXXSTD=03,11,14,1z Job 5"
|
||||
buildtype: "boost"
|
||||
packages: "g++-5"
|
||||
packages_to_remove: ""
|
||||
os: "ubuntu-20.04"
|
||||
container: "ubuntu:16.04"
|
||||
cxx: "g++-5"
|
||||
sources: ""
|
||||
llvm_os: ""
|
||||
llvm_ver: ""
|
||||
toolset: "gcc"
|
||||
compiler: "g++-5"
|
||||
cxxstd: "03,11,14,1z"
|
||||
- name: "TOOLSET=gcc COMPILER=g++-6 CXXSTD=03,11,14,1z Job 6"
|
||||
buildtype: "boost"
|
||||
packages: "g++-6"
|
||||
packages_to_remove: ""
|
||||
os: "ubuntu-20.04"
|
||||
container: "ubuntu:16.04"
|
||||
cxx: "g++-6"
|
||||
sources: ""
|
||||
llvm_os: ""
|
||||
llvm_ver: ""
|
||||
toolset: "gcc"
|
||||
compiler: "g++-6"
|
||||
cxxstd: "03,11,14,1z"
|
||||
- name: "TOOLSET=gcc COMPILER=g++-7 CXXSTD=03,11,14,17 Job 7"
|
||||
buildtype: "boost"
|
||||
packages: "g++-7"
|
||||
packages_to_remove: ""
|
||||
os: "ubuntu-20.04"
|
||||
container: "ubuntu:16.04"
|
||||
cxx: "g++-7"
|
||||
sources: ""
|
||||
llvm_os: ""
|
||||
llvm_ver: ""
|
||||
toolset: "gcc"
|
||||
compiler: "g++-7"
|
||||
cxxstd: "03,11,14,17"
|
||||
- name: "TOOLSET=clang COMPILER=clang++ CXXSTD=03,11 Job 8"
|
||||
buildtype: "boost"
|
||||
packages: ""
|
||||
packages_to_remove: ""
|
||||
os: "ubuntu-18.04"
|
||||
cxx: "clang++"
|
||||
sources: ""
|
||||
llvm_os: ""
|
||||
llvm_ver: ""
|
||||
toolset: "clang"
|
||||
compiler: "clang++"
|
||||
cxxstd: "03,11"
|
||||
- name: "TOOLSET=clang COMPILER=clang++-3.5 CXXSTD=03, Job 9"
|
||||
buildtype: "boost"
|
||||
packages: "clang-3.5 libstdc++-4.9-dev"
|
||||
packages_to_remove: ""
|
||||
os: "ubuntu-20.04"
|
||||
container: "ubuntu:16.04"
|
||||
cxx: "clang++-3.5"
|
||||
sources: ""
|
||||
llvm_os: "precise"
|
||||
llvm_ver: "3.5"
|
||||
toolset: "clang"
|
||||
compiler: "clang++-3.5"
|
||||
cxxstd: "03,11,14"
|
||||
- name: "TOOLSET=clang COMPILER=clang++-3.6 CXXSTD=03, Job 10"
|
||||
buildtype: "boost"
|
||||
packages: "clang-3.6"
|
||||
packages_to_remove: ""
|
||||
os: "ubuntu-20.04"
|
||||
container: "ubuntu:16.04"
|
||||
cxx: "clang++-3.6"
|
||||
sources: ""
|
||||
llvm_os: "precise"
|
||||
llvm_ver: "3.6"
|
||||
toolset: "clang"
|
||||
compiler: "clang++-3.6"
|
||||
cxxstd: "03,11,14"
|
||||
- name: "TOOLSET=clang COMPILER=clang++-3.7 CXXSTD=03, Job 11"
|
||||
buildtype: "boost"
|
||||
packages: "clang-3.7"
|
||||
packages_to_remove: ""
|
||||
os: "ubuntu-20.04"
|
||||
container: "ubuntu:16.04"
|
||||
cxx: "clang++-3.7"
|
||||
sources: ""
|
||||
llvm_os: "precise"
|
||||
llvm_ver: "3.7"
|
||||
toolset: "clang"
|
||||
compiler: "clang++-3.7"
|
||||
cxxstd: "03,11,14"
|
||||
- name: "TOOLSET=clang COMPILER=clang++-3.8 CXXSTD=03, Job 12"
|
||||
buildtype: "boost"
|
||||
packages: "clang-3.8 libstdc++-4.9-dev"
|
||||
packages_to_remove: ""
|
||||
os: "ubuntu-20.04"
|
||||
container: "ubuntu:16.04"
|
||||
cxx: "clang++-3.8"
|
||||
sources: ""
|
||||
llvm_os: "precise"
|
||||
llvm_ver: "3.8"
|
||||
toolset: "clang"
|
||||
compiler: "clang++-3.8"
|
||||
cxxstd: "03,11,14"
|
||||
- name: "TOOLSET=clang COMPILER=clang++-3.9 CXXSTD=03, Job 13"
|
||||
buildtype: "boost"
|
||||
packages: "clang-3.9 libstdc++-4.9-dev"
|
||||
packages_to_remove: ""
|
||||
os: "ubuntu-20.04"
|
||||
container: "ubuntu:16.04"
|
||||
cxx: "clang++-3.9"
|
||||
sources: ""
|
||||
llvm_os: "precise"
|
||||
llvm_ver: "3.9"
|
||||
toolset: "clang"
|
||||
compiler: "clang++-3.9"
|
||||
cxxstd: "03,11,14"
|
||||
- name: "TOOLSET=clang COMPILER=clang++-4.0 CXXSTD=03, Job 14"
|
||||
buildtype: "boost"
|
||||
packages: "clang-4.0"
|
||||
packages_to_remove: ""
|
||||
os: "ubuntu-20.04"
|
||||
container: "ubuntu:16.04"
|
||||
cxx: "clang++-4.0"
|
||||
sources: ""
|
||||
llvm_os: "xenial"
|
||||
llvm_ver: "4.0"
|
||||
toolset: "clang"
|
||||
compiler: "clang++-4.0"
|
||||
cxxstd: "03,11,14"
|
||||
- name: "TOOLSET=clang COMPILER=clang++-5.0 CXXSTD=03, Job 15"
|
||||
buildtype: "boost"
|
||||
packages: "clang-5.0"
|
||||
packages_to_remove: ""
|
||||
os: "ubuntu-20.04"
|
||||
container: "ubuntu:16.04"
|
||||
cxx: "clang++-5.0"
|
||||
sources: ""
|
||||
llvm_os: "xenial"
|
||||
llvm_ver: "5.0"
|
||||
toolset: "clang"
|
||||
compiler: "clang++-5.0"
|
||||
cxxstd: "03,11,14,1z"
|
||||
|
||||
runs-on: ${{ matrix.os }}
|
||||
container: ${{ matrix.container }}
|
||||
|
||||
steps:
|
||||
- name: Check if running in container
|
||||
if: matrix.container != ''
|
||||
run: echo "GHA_CONTAINER=${{ matrix.container }}" >> $GITHUB_ENV
|
||||
- name: If running in container, upgrade packages
|
||||
if: matrix.container != ''
|
||||
run: |
|
||||
apt-get -o Acquire::Retries=3 update && DEBIAN_FRONTEND=noninteractive apt-get -y install tzdata && apt-get -o Acquire::Retries=3 install -y sudo software-properties-common wget curl apt-transport-https make apt-file sudo unzip libssl-dev build-essential autotools-dev autoconf automake g++ libc++-helpers python ruby cpio gcc-multilib g++-multilib pkgconf python3 ccache libpython-dev
|
||||
sudo apt-add-repository ppa:git-core/ppa
|
||||
sudo apt-get -o Acquire::Retries=3 update && apt-get -o Acquire::Retries=3 -y install git
|
||||
python_version=$(python3 -c 'import sys; print("{0.major}.{0.minor}".format(sys.version_info))')
|
||||
sudo wget https://bootstrap.pypa.io/pip/$python_version/get-pip.py
|
||||
sudo python3 get-pip.py
|
||||
sudo /usr/local/bin/pip install cmake
|
||||
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: linux
|
||||
shell: bash
|
||||
env:
|
||||
CXX: ${{ matrix.cxx }}
|
||||
SOURCES: ${{ matrix.sources }}
|
||||
LLVM_OS: ${{ matrix.llvm_os }}
|
||||
LLVM_VER: ${{ matrix.llvm_ver }}
|
||||
PACKAGES: ${{ matrix.packages }}
|
||||
PACKAGES_TO_REMOVE: ${{ matrix.packages_to_remove }}
|
||||
JOB_BUILDTYPE: ${{ matrix.buildtype }}
|
||||
TEST_CMAKE: ${{ matrix.test_cmake }}
|
||||
TOOLSET: ${{ matrix.toolset }}
|
||||
COMPILER: ${{ matrix.compiler }}
|
||||
CXXSTD: ${{ matrix.cxxstd }}
|
||||
TRAVIS_BRANCH: ${{ github.base_ref }}
|
||||
TRAVIS_OS_NAME: "linux"
|
||||
run: |
|
||||
echo '==================================> SETUP'
|
||||
echo '==================================> PACKAGES'
|
||||
set -e
|
||||
if [ -n "$PACKAGES_TO_REMOVE" ]; then sudo apt-get purge -y $PACKAGES_TO_REMOVE; fi
|
||||
echo ">>>>> APT: REPO.."
|
||||
for i in {1..3}; do sudo -E apt-add-repository -y "ppa:ubuntu-toolchain-r/test" && break || sleep 2; done
|
||||
|
||||
if test -n "${LLVM_OS}" ; then
|
||||
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
|
||||
if test -n "${LLVM_VER}" ; then
|
||||
sudo -E apt-add-repository "deb http://apt.llvm.org/${LLVM_OS}/ llvm-toolchain-${LLVM_OS}-${LLVM_VER} main"
|
||||
else
|
||||
# Snapshot (i.e. trunk) build of clang
|
||||
sudo -E apt-add-repository "deb http://apt.llvm.org/${LLVM_OS}/ llvm-toolchain-${LLVM_OS} main"
|
||||
fi
|
||||
fi
|
||||
echo ">>>>> APT: UPDATE.."
|
||||
sudo -E apt-get -o Acquire::Retries=3 update
|
||||
if test -n "${SOURCES}" ; then
|
||||
echo ">>>>> APT: INSTALL SOURCES.."
|
||||
for SOURCE in $SOURCES; do
|
||||
sudo -E apt-add-repository ppa:$SOURCE
|
||||
done
|
||||
fi
|
||||
echo ">>>>> APT: INSTALL ${PACKAGES}.."
|
||||
sudo -E DEBIAN_FRONTEND=noninteractive apt-get -o Acquire::Retries=3 -y --no-install-suggests --no-install-recommends install ${PACKAGES}
|
||||
|
||||
echo '==================================> INSTALL AND COMPILE'
|
||||
set -e
|
||||
export TRAVIS_BUILD_DIR=$(pwd)
|
||||
export TRAVIS_BRANCH=${TRAVIS_BRANCH:-$(echo $GITHUB_REF | awk 'BEGIN { FS = "/" } ; { print $3 }')}
|
||||
export VCS_COMMIT_ID=$GITHUB_SHA
|
||||
export GIT_COMMIT=$GITHUB_SHA
|
||||
export REPO_NAME=$(basename $GITHUB_REPOSITORY)
|
||||
export USER=$(whoami)
|
||||
export CC=${CC:-gcc}
|
||||
export PATH=~/.local/bin:/usr/local/bin:$PATH
|
||||
|
||||
if [ "$JOB_BUILDTYPE" == "96ad197d74-2319b6d45f" ]; then
|
||||
|
||||
echo '==================================> INSTALL'
|
||||
|
||||
BOOST_BRANCH=develop && [ "$TRAVIS_BRANCH" == "master" ] && BOOST_BRANCH=master || true
|
||||
git clone -b $BOOST_BRANCH --depth 1 https://github.com/boostorg/assert.git ../assert
|
||||
git clone -b $BOOST_BRANCH --depth 1 https://github.com/boostorg/config.git ../config
|
||||
git clone -b $BOOST_BRANCH --depth 1 https://github.com/boostorg/core.git ../core
|
||||
git clone -b $BOOST_BRANCH --depth 1 https://github.com/boostorg/static_assert.git ../static_assert
|
||||
git clone -b $BOOST_BRANCH --depth 1 https://github.com/boostorg/throw_exception.git ../throw_exception
|
||||
|
||||
echo '==================================> SCRIPT'
|
||||
|
||||
mkdir __build__ && cd __build__
|
||||
cmake ../test/test_cmake
|
||||
cmake --build .
|
||||
|
||||
elif [ "$JOB_BUILDTYPE" == "boost" ]; then
|
||||
|
||||
echo '==================================> INSTALL'
|
||||
|
||||
BOOST_BRANCH=develop && [ "$TRAVIS_BRANCH" == "master" ] && BOOST_BRANCH=master || true
|
||||
cd ..
|
||||
git clone -b $BOOST_BRANCH --depth 1 https://github.com/boostorg/boost.git boost-root
|
||||
cd boost-root
|
||||
git submodule update --init tools/build
|
||||
git submodule update --init libs/config
|
||||
git submodule update --init tools/boostdep
|
||||
cp -r $TRAVIS_BUILD_DIR/* libs/array
|
||||
python tools/boostdep/depinst/depinst.py array
|
||||
./bootstrap.sh
|
||||
./b2 headers
|
||||
|
||||
echo '==================================> SCRIPT'
|
||||
|
||||
echo "using $TOOLSET : : $COMPILER ;" > ~/user-config.jam
|
||||
./b2 -j 3 libs/array/test toolset=$TOOLSET cxxstd=$CXXSTD
|
||||
|
||||
fi
|
||||
osx:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- name: "TOOLSET=clang COMPILER=clang++ CXXSTD=03,11,1 Job 16"
|
||||
buildtype: "boost"
|
||||
packages: ""
|
||||
os: "macos-10.15"
|
||||
cxx: "clang++"
|
||||
sources: ""
|
||||
llvm_os: ""
|
||||
llvm_ver: ""
|
||||
xcode_version: 11.7
|
||||
toolset: "clang"
|
||||
compiler: "clang++"
|
||||
cxxstd: "03,11,14,1z"
|
||||
|
||||
runs-on: ${{ matrix.os }}
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Set DEVELOPER_DIR
|
||||
if: matrix.xcode_version != ''
|
||||
run: echo "DEVELOPER_DIR=/Applications/Xcode_${{ matrix.xcode_version }}.app/Contents/Developer" >> $GITHUB_ENV
|
||||
- name: Test DEVELOPER_DIR
|
||||
run: echo $DEVELOPER_DIR
|
||||
|
||||
- name: "osx"
|
||||
shell: bash
|
||||
env:
|
||||
CXX: ${{ matrix.cxx }}
|
||||
SOURCES: ${{ matrix.sources }}
|
||||
LLVM_OS: ${{ matrix.llvm_os }}
|
||||
LLVM_VER: ${{ matrix.llvm_ver }}
|
||||
PACKAGES: ${{ matrix.packages }}
|
||||
JOB_BUILDTYPE: ${{ matrix.buildtype }}
|
||||
TEST_CMAKE: ${{ matrix.test_cmake }}
|
||||
TOOLSET: ${{ matrix.toolset }}
|
||||
COMPILER: ${{ matrix.compiler }}
|
||||
CXXSTD: ${{ matrix.cxxstd }}
|
||||
TRAVIS_BRANCH: ${{ github.base_ref }}
|
||||
TRAVIS_OS_NAME: "osx"
|
||||
run: |
|
||||
echo '==================================> SETUP'
|
||||
set -e
|
||||
sudo mv /Library/Developer/CommandLineTools /Library/Developer/CommandLineTools.bck
|
||||
echo '==================================> PACKAGES'
|
||||
echo '==================================> INSTALL AND COMPILE'
|
||||
set -e
|
||||
export TRAVIS_BUILD_DIR=$(pwd)
|
||||
export TRAVIS_BRANCH=${TRAVIS_BRANCH:-$(echo $GITHUB_REF | awk 'BEGIN { FS = "/" } ; { print $3 }')}
|
||||
export VCS_COMMIT_ID=$GITHUB_SHA
|
||||
export GIT_COMMIT=$GITHUB_SHA
|
||||
export REPO_NAME=$(basename $GITHUB_REPOSITORY)
|
||||
export USER=$(whoami)
|
||||
export CC=${CC:-gcc}
|
||||
export PATH=~/.local/bin:/usr/local/bin:$PATH
|
||||
|
||||
if [ "$JOB_BUILDTYPE" == "boost" ]; then
|
||||
|
||||
echo '==================================> INSTALL'
|
||||
|
||||
BOOST_BRANCH=develop && [ "$TRAVIS_BRANCH" == "master" ] && BOOST_BRANCH=master || true
|
||||
cd ..
|
||||
git clone -b $BOOST_BRANCH --depth 1 https://github.com/boostorg/boost.git boost-root
|
||||
cd boost-root
|
||||
git submodule update --init tools/build
|
||||
git submodule update --init libs/config
|
||||
git submodule update --init tools/boostdep
|
||||
cp -r $TRAVIS_BUILD_DIR/* libs/array
|
||||
python tools/boostdep/depinst/depinst.py array
|
||||
./bootstrap.sh
|
||||
./b2 headers
|
||||
|
||||
echo '==================================> SCRIPT'
|
||||
|
||||
echo "using $TOOLSET : : $COMPILER ;" > ~/user-config.jam
|
||||
./b2 -j 3 libs/array/test toolset=$TOOLSET cxxstd=$CXXSTD
|
||||
|
||||
fi
|
217
.travis.yml
Normal file
217
.travis.yml
Normal file
@ -0,0 +1,217 @@
|
||||
# Copyright 2016, 2017 Peter Dimov
|
||||
# Copyright 2018, Mike-Dev
|
||||
# Distributed under the Boost Software License, Version 1.0.
|
||||
# (See accompanying file LICENSE_1_0.txt or copy at http://boost.org/LICENSE_1_0.txt)
|
||||
|
||||
language: cpp
|
||||
|
||||
sudo: false
|
||||
|
||||
python: "2.7"
|
||||
|
||||
branches:
|
||||
only:
|
||||
- master
|
||||
- develop
|
||||
- /feature\/.*/
|
||||
|
||||
env:
|
||||
matrix:
|
||||
- BOGUS_JOB=true
|
||||
|
||||
matrix:
|
||||
|
||||
exclude:
|
||||
- env: BOGUS_JOB=true
|
||||
|
||||
include:
|
||||
|
||||
# cmake self-test
|
||||
- os: linux
|
||||
env: TEST_CMAKE=TRUE #Only for easier identification in travis web gui
|
||||
install:
|
||||
- BOOST_BRANCH=develop && [ "$TRAVIS_BRANCH" == "master" ] && BOOST_BRANCH=master || true
|
||||
- git clone -b $BOOST_BRANCH --depth 1 https://github.com/boostorg/assert.git ../assert
|
||||
- git clone -b $BOOST_BRANCH --depth 1 https://github.com/boostorg/config.git ../config
|
||||
- git clone -b $BOOST_BRANCH --depth 1 https://github.com/boostorg/core.git ../core
|
||||
- git clone -b $BOOST_BRANCH --depth 1 https://github.com/boostorg/static_assert.git ../static_assert
|
||||
- git clone -b $BOOST_BRANCH --depth 1 https://github.com/boostorg/throw_exception.git ../throw_exception
|
||||
|
||||
script:
|
||||
- mkdir __build__ && cd __build__
|
||||
- cmake ../test/test_cmake
|
||||
- cmake --build .
|
||||
|
||||
- os: linux
|
||||
compiler: g++
|
||||
env: TOOLSET=gcc COMPILER=g++ CXXSTD=03,11
|
||||
|
||||
- os: linux
|
||||
compiler: g++-4.7
|
||||
env: TOOLSET=gcc COMPILER=g++-4.7 CXXSTD=03,11
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- g++-4.7
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
|
||||
- os: linux
|
||||
compiler: g++-4.8
|
||||
env: TOOLSET=gcc COMPILER=g++-4.8 CXXSTD=03,11
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- g++-4.8
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
- os: linux
|
||||
compiler: g++-4.9
|
||||
env: TOOLSET=gcc COMPILER=g++-4.9 CXXSTD=03,11
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- g++-4.9
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
|
||||
- os: linux
|
||||
compiler: g++-5
|
||||
env: TOOLSET=gcc COMPILER=g++-5 CXXSTD=03,11,14,1z
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- g++-5
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
|
||||
- os: linux
|
||||
compiler: g++-6
|
||||
env: TOOLSET=gcc COMPILER=g++-6 CXXSTD=03,11,14,1z
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- g++-6
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
|
||||
- os: linux
|
||||
dist: trusty
|
||||
compiler: g++-7
|
||||
env: TOOLSET=gcc COMPILER=g++-7 CXXSTD=03,11,14,17
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- g++-7
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
|
||||
- os: linux
|
||||
compiler: clang++
|
||||
env: TOOLSET=clang COMPILER=clang++ CXXSTD=03,11
|
||||
|
||||
- os: linux
|
||||
compiler: clang++-3.5
|
||||
env: TOOLSET=clang COMPILER=clang++-3.5 CXXSTD=03,11,14,1z
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- clang-3.5
|
||||
- libstdc++-4.9-dev
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
- llvm-toolchain-precise-3.5
|
||||
|
||||
- os: linux
|
||||
compiler: clang++-3.6
|
||||
env: TOOLSET=clang COMPILER=clang++-3.6 CXXSTD=03,11,14,1z
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- clang-3.6
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
- llvm-toolchain-precise-3.6
|
||||
|
||||
- os: linux
|
||||
compiler: clang++-3.7
|
||||
env: TOOLSET=clang COMPILER=clang++-3.7 CXXSTD=03,11,14,1z
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- clang-3.7
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
- llvm-toolchain-precise-3.7
|
||||
|
||||
- os: linux
|
||||
compiler: clang++-3.8
|
||||
env: TOOLSET=clang COMPILER=clang++-3.8 CXXSTD=03,11,14,1z
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- clang-3.8
|
||||
- libstdc++-4.9-dev
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
- llvm-toolchain-precise-3.8
|
||||
|
||||
- os: linux
|
||||
compiler: clang++-3.9
|
||||
env: TOOLSET=clang COMPILER=clang++-3.9 CXXSTD=03,11,14,1z
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- clang-3.9
|
||||
- libstdc++-4.9-dev
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
- llvm-toolchain-precise-3.9
|
||||
|
||||
- os: linux
|
||||
compiler: clang++-4.0
|
||||
env: TOOLSET=clang COMPILER=clang++-4.0 CXXSTD=03,11,14,1z
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- clang-4.0
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
- llvm-toolchain-trusty-4.0
|
||||
|
||||
- os: linux
|
||||
compiler: clang++-5.0
|
||||
env: TOOLSET=clang COMPILER=clang++-5.0 CXXSTD=03,11,14,1z
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- clang-5.0
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
- llvm-toolchain-trusty-5.0
|
||||
|
||||
- os: osx
|
||||
compiler: clang++
|
||||
env: TOOLSET=clang COMPILER=clang++ CXXSTD=03,11,14,1z
|
||||
|
||||
install:
|
||||
- BOOST_BRANCH=develop && [ "$TRAVIS_BRANCH" == "master" ] && BOOST_BRANCH=master || true
|
||||
- cd ..
|
||||
- git clone -b $BOOST_BRANCH --depth 1 https://github.com/boostorg/boost.git boost-root
|
||||
- cd boost-root
|
||||
- git submodule update --init tools/build
|
||||
- git submodule update --init libs/config
|
||||
- git submodule update --init tools/boostdep
|
||||
- cp -r $TRAVIS_BUILD_DIR/* libs/array
|
||||
- python tools/boostdep/depinst/depinst.py array
|
||||
- ./bootstrap.sh
|
||||
- ./b2 headers
|
||||
|
||||
script:
|
||||
- |-
|
||||
echo "using $TOOLSET : : $COMPILER ;" > ~/user-config.jam
|
||||
- ./b2 -j 3 libs/array/test toolset=$TOOLSET cxxstd=$CXXSTD
|
||||
|
||||
notifications:
|
||||
email:
|
||||
on_success: always
|
41
CMakeLists.txt
Normal file
41
CMakeLists.txt
Normal file
@ -0,0 +1,41 @@
|
||||
# Copyright 2018 Mike Dev
|
||||
# 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
|
||||
|
||||
if(NOT DEFINED IDF_TARGET)
|
||||
|
||||
cmake_minimum_required(VERSION 3.5...3.20)
|
||||
project(boost_array VERSION "${BOOST_SUPERPROJECT_VERSION}" LANGUAGES CXX)
|
||||
|
||||
add_library(boost_array INTERFACE)
|
||||
add_library(Boost::array ALIAS boost_array)
|
||||
|
||||
target_include_directories(boost_array INTERFACE include)
|
||||
|
||||
target_link_libraries(boost_array
|
||||
INTERFACE
|
||||
Boost::assert
|
||||
Boost::config
|
||||
Boost::core
|
||||
Boost::static_assert
|
||||
Boost::throw_exception
|
||||
)
|
||||
|
||||
else()
|
||||
|
||||
FILE(GLOB_RECURSE headers include/*.h include/*.hpp)
|
||||
|
||||
idf_component_register(
|
||||
SRCS
|
||||
${headers}
|
||||
INCLUDE_DIRS
|
||||
include
|
||||
REQUIRES
|
||||
boost_assert
|
||||
boost_config
|
||||
boost_core
|
||||
boost_static_assert
|
||||
boost_throw_exception
|
||||
)
|
||||
|
||||
endif()
|
@ -41,13 +41,12 @@
|
||||
#endif
|
||||
|
||||
#include <cstddef>
|
||||
#include <iterator>
|
||||
#include <stdexcept>
|
||||
#include <boost/assert.hpp>
|
||||
#include <boost/static_assert.hpp>
|
||||
#include <boost/swap.hpp>
|
||||
|
||||
// Handles broken standard libraries better than <iterator>
|
||||
#include <boost/detail/iterator.hpp>
|
||||
#include <boost/throw_exception.hpp>
|
||||
#include <algorithm>
|
||||
|
||||
@ -183,7 +182,7 @@ namespace boost {
|
||||
|
||||
// check range (may be private because it is static)
|
||||
static BOOST_CONSTEXPR bool rangecheck (size_type i) {
|
||||
return i > size() ? boost::throw_exception(std::out_of_range ("array<>: index out of range")), true : true;
|
||||
return i >= size() ? boost::throw_exception(std::out_of_range ("array<>: index out of range")), true : true;
|
||||
}
|
||||
|
||||
};
|
||||
|
@ -13,5 +13,6 @@
|
||||
],
|
||||
"maintainers": [
|
||||
"Marshall Clow <marshall -at- idio.com>"
|
||||
]
|
||||
],
|
||||
"cxxstd": "03"
|
||||
}
|
||||
|
@ -2,24 +2,17 @@
|
||||
#~ 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)
|
||||
|
||||
import testing ;
|
||||
|
||||
alias unit_test_framework
|
||||
: # sources
|
||||
/boost//unit_test_framework
|
||||
;
|
||||
|
||||
test-suite array :
|
||||
[ run array0.cpp unit_test_framework : : : : array0 ]
|
||||
[ run array0.cpp ]
|
||||
[ run array1.cpp ]
|
||||
[ run array2.cpp ]
|
||||
[ run array3.cpp ]
|
||||
[ run array4.cpp ]
|
||||
[ run array5.cpp ]
|
||||
[ run array6.cpp unit_test_framework : : : : array6 ]
|
||||
[ run array7.cpp unit_test_framework : : : : array7 ]
|
||||
# [ run array_constexpr.cpp unit_test_framework : : : : array_constexpr ]
|
||||
[ run array6.cpp ]
|
||||
[ run array7.cpp ]
|
||||
# [ run array_constexpr.cpp ]
|
||||
[ compile-fail array_getfail1.cpp ]
|
||||
[ compile-fail array_getfail2.cpp ]
|
||||
[ run array_hash.cpp unit_test_framework : : : : array_hash ]
|
||||
[ run array_hash.cpp ]
|
||||
;
|
||||
|
@ -9,15 +9,14 @@
|
||||
#include <iostream>
|
||||
#include <boost/array.hpp>
|
||||
|
||||
#define BOOST_TEST_MAIN
|
||||
#include <boost/test/unit_test.hpp>
|
||||
#include <boost/core/lightweight_test_trait.hpp>
|
||||
|
||||
namespace {
|
||||
|
||||
template< class T >
|
||||
void BadValue( const T & )
|
||||
{
|
||||
BOOST_CHECK ( false );
|
||||
BOOST_TEST ( false );
|
||||
}
|
||||
|
||||
template< class T >
|
||||
@ -33,19 +32,19 @@ void RunTests()
|
||||
|
||||
// front/back and operator[] must compile, but calling them is undefined
|
||||
// Likewise, all tests below should evaluate to false, avoiding undefined behaviour
|
||||
BOOST_CHECK ( test_case.empty());
|
||||
BOOST_CHECK ( const_test_case.empty());
|
||||
BOOST_TEST ( test_case.empty());
|
||||
BOOST_TEST ( const_test_case.empty());
|
||||
|
||||
BOOST_CHECK ( test_case.size() == 0 );
|
||||
BOOST_CHECK ( const_test_case.size() == 0 );
|
||||
BOOST_TEST ( test_case.size() == 0 );
|
||||
BOOST_TEST ( const_test_case.size() == 0 );
|
||||
|
||||
// Assert requirements of TR1 6.2.2.4
|
||||
BOOST_CHECK ( test_case.begin() == test_case.end());
|
||||
BOOST_CHECK ( test_case.cbegin() == test_case.cend());
|
||||
BOOST_CHECK ( const_test_case.begin() == const_test_case.end());
|
||||
BOOST_CHECK ( const_test_case.cbegin() == const_test_case.cend());
|
||||
BOOST_TEST ( test_case.begin() == test_case.end());
|
||||
BOOST_TEST ( test_case.cbegin() == test_case.cend());
|
||||
BOOST_TEST ( const_test_case.begin() == const_test_case.end());
|
||||
BOOST_TEST ( const_test_case.cbegin() == const_test_case.cend());
|
||||
|
||||
BOOST_CHECK ( test_case.begin() != const_test_case.begin() );
|
||||
BOOST_TEST ( test_case.begin() != const_test_case.begin() );
|
||||
if( test_case.data() == const_test_case.data() ) {
|
||||
// Value of data is unspecified in TR1, so no requirement this test pass or fail
|
||||
// However, it must compile!
|
||||
@ -79,11 +78,12 @@ void RunTests()
|
||||
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE( test_main )
|
||||
int main()
|
||||
{
|
||||
RunTests< bool >();
|
||||
RunTests< void * >();
|
||||
RunTests< long double >();
|
||||
RunTests< std::string >();
|
||||
}
|
||||
|
||||
return boost::report_errors();
|
||||
}
|
||||
|
@ -10,8 +10,7 @@
|
||||
#include <boost/array.hpp>
|
||||
#include <algorithm>
|
||||
|
||||
#define BOOST_TEST_MAIN
|
||||
#include <boost/test/unit_test.hpp>
|
||||
#include <boost/core/lightweight_test_trait.hpp>
|
||||
|
||||
namespace {
|
||||
template< class T >
|
||||
@ -22,19 +21,40 @@ namespace {
|
||||
test_type test_case; // = { 1, 1, 2, 3, 5 };
|
||||
|
||||
arr &aRef = get_c_array ( test_case );
|
||||
BOOST_CHECK ( &*test_case.begin () == &aRef[0] );
|
||||
BOOST_TEST ( &*test_case.begin () == &aRef[0] );
|
||||
|
||||
const arr &caRef = get_c_array ( test_case );
|
||||
typename test_type::const_iterator iter = test_case.begin ();
|
||||
BOOST_CHECK ( &*iter == &caRef[0] );
|
||||
BOOST_TEST ( &*iter == &caRef[0] );
|
||||
|
||||
// Confirm at() throws the std lib defined exception
|
||||
try {
|
||||
test_case.at( test_case.size());
|
||||
BOOST_TEST(false);
|
||||
}
|
||||
catch ( const std::out_of_range & ) {}
|
||||
|
||||
try {
|
||||
test_case.at( test_case.size() + 1);
|
||||
BOOST_TEST(false);
|
||||
}
|
||||
catch ( const std::out_of_range & ) {}
|
||||
|
||||
try {
|
||||
test_case.at( test_case.size() + 100);
|
||||
BOOST_TEST(false);
|
||||
}
|
||||
catch ( const std::out_of_range & ) {}
|
||||
}
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE( test_main )
|
||||
int main ()
|
||||
{
|
||||
RunTests< bool >();
|
||||
RunTests< void * >();
|
||||
RunTests< long double >();
|
||||
RunTests< std::string >();
|
||||
|
||||
return boost::report_errors();
|
||||
}
|
||||
|
||||
|
@ -13,8 +13,7 @@
|
||||
#include <array>
|
||||
#endif
|
||||
|
||||
#define BOOST_TEST_MAIN
|
||||
#include <boost/test/unit_test.hpp>
|
||||
#include <boost/core/lightweight_test_trait.hpp>
|
||||
|
||||
namespace {
|
||||
|
||||
@ -23,14 +22,13 @@ namespace {
|
||||
void RunStdTests()
|
||||
{
|
||||
typedef boost::array< T, 5 > test_type;
|
||||
typedef T arr[5];
|
||||
test_type test_case; // = { 1, 1, 2, 3, 5 };
|
||||
|
||||
T &aRef = std::get<0> ( test_case );
|
||||
BOOST_CHECK ( &*test_case.begin () == &aRef );
|
||||
BOOST_TEST ( &*test_case.begin () == &aRef );
|
||||
|
||||
const T &caRef = std::get<0> ( test_case );
|
||||
BOOST_CHECK ( &*test_case.cbegin () == &caRef );
|
||||
BOOST_TEST ( &*test_case.cbegin () == &caRef );
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -38,19 +36,18 @@ namespace {
|
||||
void RunBoostTests()
|
||||
{
|
||||
typedef boost::array< T, 5 > test_type;
|
||||
typedef T arr[5];
|
||||
test_type test_case; // = { 1, 1, 2, 3, 5 };
|
||||
|
||||
T &aRef = boost::get<0> ( test_case );
|
||||
BOOST_CHECK ( &*test_case.begin () == &aRef );
|
||||
BOOST_TEST ( &*test_case.begin () == &aRef );
|
||||
|
||||
const T &caRef = boost::get<0> ( test_case );
|
||||
BOOST_CHECK ( &*test_case.cbegin () == &caRef );
|
||||
BOOST_TEST ( &*test_case.cbegin () == &caRef );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE( test_main )
|
||||
int main()
|
||||
{
|
||||
RunBoostTests< bool >();
|
||||
RunBoostTests< void * >();
|
||||
@ -63,5 +60,7 @@ BOOST_AUTO_TEST_CASE( test_main )
|
||||
RunStdTests< long double >();
|
||||
RunStdTests< std::string >();
|
||||
#endif
|
||||
|
||||
return boost::report_errors();
|
||||
}
|
||||
|
||||
|
@ -13,9 +13,6 @@
|
||||
#include <array>
|
||||
#endif
|
||||
|
||||
#define BOOST_TEST_MAIN
|
||||
#include <boost/test/unit_test.hpp>
|
||||
|
||||
#ifndef BOOST_NO_CXX11_CONSTEXPR
|
||||
constexpr boost::array<int, 10> arr {{ 0,1,2,3,4,5,6,7,8,9 }};
|
||||
constexpr std::array<int, 10> arr_std {{ 0,1,2,3,4,5,6,7,8,9 }};
|
||||
@ -26,7 +23,7 @@ void sink ( T t ) {}
|
||||
template <typename T, size_t N>
|
||||
void sink ( boost::array<T,N> &arr ) {}
|
||||
|
||||
BOOST_AUTO_TEST_CASE( test_main )
|
||||
int main()
|
||||
{
|
||||
// constexpr int two = arr_std.at (2);
|
||||
constexpr int three = arr.at (3);
|
||||
@ -36,7 +33,7 @@ BOOST_AUTO_TEST_CASE( test_main )
|
||||
}
|
||||
|
||||
#else // no constexpr means no constexpr tests!
|
||||
BOOST_AUTO_TEST_CASE( test_main )
|
||||
int main()
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
@ -16,8 +16,7 @@
|
||||
#include <array>
|
||||
#endif
|
||||
|
||||
#define BOOST_TEST_MAIN
|
||||
#include <boost/test/unit_test.hpp>
|
||||
#include <boost/core/lightweight_test_trait.hpp>
|
||||
|
||||
namespace {
|
||||
|
||||
@ -30,13 +29,13 @@ namespace {
|
||||
test_type test_case; // = { 1, 1, 2, 3, 5 };
|
||||
|
||||
T &aRef = std::get<5> ( test_case ); // should fail to compile
|
||||
BOOST_CHECK ( &*test_case.begin () == &aRef );
|
||||
BOOST_TEST ( &*test_case.begin () == &aRef );
|
||||
}
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE( test_main )
|
||||
int main()
|
||||
{
|
||||
#ifndef BOOST_NO_CXX11_HDR_ARRAY
|
||||
RunStdTests< bool >();
|
||||
@ -46,4 +45,6 @@ BOOST_AUTO_TEST_CASE( test_main )
|
||||
#else
|
||||
BOOST_STATIC_ASSERT ( false ); // fail on C++03 systems.
|
||||
#endif
|
||||
|
||||
return boost::report_errors();
|
||||
}
|
||||
|
@ -13,8 +13,7 @@
|
||||
#include <array>
|
||||
#endif
|
||||
|
||||
#define BOOST_TEST_MAIN
|
||||
#include <boost/test/unit_test.hpp>
|
||||
#include <boost/core/lightweight_test_trait.hpp>
|
||||
|
||||
namespace {
|
||||
|
||||
@ -27,10 +26,10 @@ namespace {
|
||||
test_type test_case; // = { 1, 1, 2, 3, 5 };
|
||||
|
||||
T &aRef = std::get<0> ( test_case );
|
||||
BOOST_CHECK ( &*test_case.begin () == &aRef );
|
||||
BOOST_TEST ( &*test_case.begin () == &aRef );
|
||||
|
||||
const T &caRef = std::get<0> ( test_case );
|
||||
BOOST_CHECK ( &*test_case.cbegin () == &caRef );
|
||||
BOOST_TEST ( &*test_case.cbegin () == &caRef );
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -42,12 +41,12 @@ namespace {
|
||||
test_type test_case; // = { 1, 1, 2, 3, 5 };
|
||||
|
||||
T &aRef = boost::get<5> ( test_case );
|
||||
BOOST_CHECK ( &*test_case.begin () == &aRef );
|
||||
BOOST_TEST ( &*test_case.begin () == &aRef );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE( test_main )
|
||||
int main()
|
||||
{
|
||||
RunBoostTests< bool >();
|
||||
RunBoostTests< void * >();
|
||||
@ -60,5 +59,7 @@ BOOST_AUTO_TEST_CASE( test_main )
|
||||
RunStdTests< long double >();
|
||||
RunStdTests< std::string >();
|
||||
#endif
|
||||
|
||||
return boost::report_errors();
|
||||
}
|
||||
|
||||
|
@ -11,8 +11,7 @@
|
||||
#include <algorithm>
|
||||
#include <boost/functional/hash.hpp>
|
||||
|
||||
#define BOOST_TEST_MAIN
|
||||
#include <boost/test/unit_test.hpp>
|
||||
#include <boost/core/lightweight_test_trait.hpp>
|
||||
|
||||
namespace {
|
||||
|
||||
@ -29,15 +28,17 @@ namespace {
|
||||
|
||||
std::size_t bhash = boost::hash<barr> () ( test_barr );
|
||||
std::size_t ahash = boost::hash<arr> () ( test_arr );
|
||||
BOOST_CHECK ( ahash == bhash );
|
||||
BOOST_TEST ( ahash == bhash );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE( test_main )
|
||||
int main()
|
||||
{
|
||||
RunTests< int >();
|
||||
RunTests< long >();
|
||||
RunTests< long double >();
|
||||
|
||||
return boost::report_errors();
|
||||
}
|
||||
|
||||
|
22
test/test_cmake/CMakeLists.txt
Normal file
22
test/test_cmake/CMakeLists.txt
Normal file
@ -0,0 +1,22 @@
|
||||
# Copyright 2018 Mike Dev
|
||||
# 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
|
||||
#
|
||||
# NOTE: This does NOT run the unit tests for Boost.Array.
|
||||
# It only tests, if the CMakeLists.txt file in it's root works as expected
|
||||
|
||||
cmake_minimum_required( VERSION 3.5 )
|
||||
|
||||
project( BoostBindCMakeSelfTest )
|
||||
|
||||
add_subdirectory( ../../../assert ${CMAKE_CURRENT_BINARY_DIR}/libs/assert )
|
||||
add_subdirectory( ../../../config ${CMAKE_CURRENT_BINARY_DIR}/libs/config )
|
||||
add_subdirectory( ../../../core ${CMAKE_CURRENT_BINARY_DIR}/libs/core )
|
||||
add_subdirectory( ../../../static_assert ${CMAKE_CURRENT_BINARY_DIR}/libs/static_assert )
|
||||
add_subdirectory( ../../../throw_exception ${CMAKE_CURRENT_BINARY_DIR}/libs/thorw_exception )
|
||||
|
||||
add_subdirectory( ../.. ${CMAKE_CURRENT_BINARY_DIR}/libs/boost_array )
|
||||
|
||||
add_executable( boost_array_cmake_self_test main.cpp )
|
||||
target_link_libraries( boost_array_cmake_self_test Boost::array )
|
||||
|
5
test/test_cmake/main.cpp
Normal file
5
test/test_cmake/main.cpp
Normal file
@ -0,0 +1,5 @@
|
||||
#include <boost/array.hpp>
|
||||
|
||||
int main() {
|
||||
boost::array<int,5> a{};
|
||||
}
|
Reference in New Issue
Block a user