mirror of
https://github.com/boostorg/conversion.git
synced 2026-08-06 13:34:14 +02:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 58e8e78899 | |||
| 8f4b6ec985 |
+5
-2
@@ -2,13 +2,14 @@
|
||||
# subject to 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)
|
||||
#
|
||||
# Copyright Antony Polukhin 2014.
|
||||
# Copyright Antony Polukhin 2014-2015.
|
||||
|
||||
#
|
||||
# See https://svn.boost.org/trac/boost/wiki/TravisCoverals for description of this file
|
||||
# and how it can be used with Boost libraries.
|
||||
#
|
||||
|
||||
language: cpp
|
||||
os:
|
||||
- linux
|
||||
|
||||
@@ -51,12 +52,14 @@ before_install:
|
||||
- PROJECT_DIR=$BOOST/libs/$PROJECT_TO_TEST
|
||||
- ./bootstrap.sh
|
||||
- ./b2 headers
|
||||
- sudo apt-get update -qq
|
||||
- sudo apt-get install -qq valgrind
|
||||
|
||||
script:
|
||||
- if [ "$CCFLAGS" != "" ]; then FLAGS="cxxflags=\"$CCFLAGS\" linkflags=\"$LINKFLAGS\""; else FLAGS=""; fi
|
||||
- cd $BOOST/libs/$PROJECT_TO_TEST/test/
|
||||
# `--coverage` flags required to generate coverage info for Coveralls
|
||||
- ../../../b2 cxxflags="--coverage -std=$CXX_STANDARD" linkflags="--coverage"
|
||||
- ../../../b2 testing.launcher=valgrind cxxflags="--coverage -std=$CXX_STANDARD" linkflags="--coverage"
|
||||
|
||||
after_success:
|
||||
# Copying Coveralls data to a separate folder
|
||||
|
||||
+4
-2
@@ -51,7 +51,8 @@ int main( int argc, char * argv[] )
|
||||
// test polymorphic_cast ---------------------------------------------------//
|
||||
|
||||
// tests which should succeed
|
||||
Base * base = new Derived;
|
||||
Derived derived_instance;
|
||||
Base * base = &derived_instance;
|
||||
Base2 * base2 = 0;
|
||||
Derived * derived = 0;
|
||||
derived = polymorphic_downcast<Derived*>( base ); // downcast
|
||||
@@ -66,7 +67,8 @@ int main( int argc, char * argv[] )
|
||||
|
||||
// tests which should result in errors being detected
|
||||
int err_count = 0;
|
||||
base = new Base;
|
||||
Base base_instance;
|
||||
base = &base_instance;
|
||||
|
||||
if ( argc > 1 && *argv[1] == '1' )
|
||||
{ derived = polymorphic_downcast<Derived*>( base ); } // #1 assert failure
|
||||
|
||||
Reference in New Issue
Block a user