Added two tests that attempt to mix rtti-on and rtti-off modules.

Those two tests must fail diring linking.
This commit is contained in:
Antony Polukhin
2013-10-18 16:00:04 +04:00
parent 5f5d6bf45f
commit 5078498c86

View File

@ -1,4 +1,4 @@
# Copyright (C) 2012 Antony Polukhin
# Copyright (C) 2012-2013 Antony Polukhin
#
# 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)
@ -7,6 +7,7 @@
import testing ;
import feature ;
# Variable that contains all the stuff required for linking against -lboost_unit_test
tlib = /boost/test//boost_unit_test_framework/<link>static ;
lib test_lib_rtti : test_lib.cpp : <link>shared ;
@ -23,6 +24,17 @@ test-suite type_index
[ run testing_crossmodule.cpp test_lib_rtti $(tlib) ]
[ run testing_crossmodule.cpp test_lib_nortti $(tlib) : : : <rtti>off : testing_crossmodule_no_rtti ]
# Bjam has specific rule for not mixing <rtti>on and <rtti>off binaries, so we can not
# just provide `test_lib_nortti` library for `<rtti>on` build. But here are some workarounds:
[ link-fail testing_crossmodule.cpp $(tlib)
: <linkflags>$(test_lib_nortti.location)/test_lib_nortti
: link_fail_rtti_nortti
]
[ link-fail testing_crossmodule.cpp $(tlib)
: <rtti>off <linkflags>$(test_lib_rtti.location)/test_lib_rtti
: link_fail_nortti_rtti
]
# Examples that must work even with RTTI disabled
[ run ../examples/registry.cpp : : : <rtti>off : registry_no_rtti ]
[ run ../examples/exact_types_match.cpp : : : <rtti>off : exact_types_match_no_rtti ]
@ -35,3 +47,4 @@ for local p in [ glob ../examples/*.cpp ]
{
type_index += [ run $(p) ] ;
}