From fe1d62dc41fc737f86e33814cb3185efef3bed9b Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Mon, 4 Sep 2017 15:20:51 +0300 Subject: [PATCH] Add quick test target --- test/Jamfile.v2 | 106 ++++++++++++++++++++++++------------------------ test/quick.cpp | 27 ++++++++++++ 2 files changed, 81 insertions(+), 52 deletions(-) create mode 100644 test/quick.cpp diff --git a/test/Jamfile.v2 b/test/Jamfile.v2 index 3c0d84b..83c74ef 100644 --- a/test/Jamfile.v2 +++ b/test/Jamfile.v2 @@ -1,6 +1,6 @@ # Boost.Bind Library test Jamfile # -# Copyright (c) 2003-2006 Peter Dimov +# Copyright (c) 2003-2006, 2017 Peter Dimov # # Distributed under the Boost Software License, Version 1.0. (See # accompanying file LICENSE_1_0.txt or copy at @@ -9,54 +9,56 @@ # bring in rules for testing import testing ; -test-suite "bind" - : [ run bind_test.cpp ] - [ run bind_dm_test.cpp ] - [ run bind_eq_test.cpp ] - [ run bind_const_test.cpp ] - [ run bind_cv_test.cpp ] - [ run bind_stateful_test.cpp ] - [ run bind_dm2_test.cpp ] - [ run bind_not_test.cpp ] - [ run bind_rel_test.cpp ] - [ run bind_function_test.cpp ] - [ run bind_lookup_problem_test.cpp ] - [ run bind_rv_sp_test.cpp ] - [ compile bind_unary_addr.cpp ] - [ run bind_dm3_test.cpp ] - [ run bind_visit_test.cpp ] - [ run bind_placeholder_test.cpp ] - [ run bind_rvalue_test.cpp ] - [ run bind_and_or_test.cpp ] - [ run bind_void_test.cpp ] - [ run bind_void_dm_test.cpp ] - [ run bind_void_mf_test.cpp ] - [ run mem_fn_test.cpp ] - [ run mem_fn_void_test.cpp ] - [ run mem_fn_derived_test.cpp ] - [ run mem_fn_eq_test.cpp ] - [ run mem_fn_dm_test.cpp ] - [ run mem_fn_rv_test.cpp ] - [ run ref_fn_test.cpp ] - [ run bind_fnobj2_test.cpp ] - [ run bind_fn2_test.cpp ] - [ run bind_mf2_test.cpp ] - [ run bind_eq2_test.cpp ] - [ run mem_fn_ref_test.cpp ] - [ run bind_ref_test.cpp ] - [ run bind_eq3_test.cpp ] - [ run protect_test.cpp ] - [ run mem_fn_unary_addr_test.cpp ] - [ run bind_function2_test.cpp ] - [ run bind_fwd_test.cpp ] - [ run bind_fwd2_test.cpp ] - [ run bind_no_placeholders_test.cpp ] - [ run placeholder_const_ref_test.cpp ] - [ run bind_function_ap_test.cpp ] - [ run bind_type_test.cpp ] - [ run bind_unique_ptr_test.cpp ] - [ run bind_nested_rv_test.cpp ] - [ compile arg_copy_test.cpp ] - [ compile-fail arg_copy_fail.cpp ] - [ run placeholder_std_bind_test.cpp ] - ; +# quick test (for CI) +run quick.cpp ; + +# full test suite +run bind_test.cpp ; +run bind_dm_test.cpp ; +run bind_eq_test.cpp ; +run bind_const_test.cpp ; +run bind_cv_test.cpp ; +run bind_stateful_test.cpp ; +run bind_dm2_test.cpp ; +run bind_not_test.cpp ; +run bind_rel_test.cpp ; +run bind_function_test.cpp ; +run bind_lookup_problem_test.cpp ; +run bind_rv_sp_test.cpp ; +compile bind_unary_addr.cpp ; +run bind_dm3_test.cpp ; +run bind_visit_test.cpp ; +run bind_placeholder_test.cpp ; +run bind_rvalue_test.cpp ; +run bind_and_or_test.cpp ; +run bind_void_test.cpp ; +run bind_void_dm_test.cpp ; +run bind_void_mf_test.cpp ; +run mem_fn_test.cpp ; +run mem_fn_void_test.cpp ; +run mem_fn_derived_test.cpp ; +run mem_fn_eq_test.cpp ; +run mem_fn_dm_test.cpp ; +run mem_fn_rv_test.cpp ; +run ref_fn_test.cpp ; +run bind_fnobj2_test.cpp ; +run bind_fn2_test.cpp ; +run bind_mf2_test.cpp ; +run bind_eq2_test.cpp ; +run mem_fn_ref_test.cpp ; +run bind_ref_test.cpp ; +run bind_eq3_test.cpp ; +run protect_test.cpp ; +run mem_fn_unary_addr_test.cpp ; +run bind_function2_test.cpp ; +run bind_fwd_test.cpp ; +run bind_fwd2_test.cpp ; +run bind_no_placeholders_test.cpp ; +run placeholder_const_ref_test.cpp ; +run bind_function_ap_test.cpp ; +run bind_type_test.cpp ; +run bind_unique_ptr_test.cpp ; +run bind_nested_rv_test.cpp ; +compile arg_copy_test.cpp ; +compile-fail arg_copy_fail.cpp ; +run placeholder_std_bind_test.cpp ; diff --git a/test/quick.cpp b/test/quick.cpp new file mode 100644 index 0000000..9aa215c --- /dev/null +++ b/test/quick.cpp @@ -0,0 +1,27 @@ +// +// quick.cpp - a quick test for boost/bind.hpp +// +// Copyright 2017 Peter Dimov +// +// 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 +// + +#include +#include + +int f( int a, int b, int c ) +{ + return a + 10 * b + 100 * c; +} + +int main() +{ + int const i = 1; + + BOOST_TEST_EQ( boost::bind( f, _1, 2, 3 )( i ), 321 ); + + return boost::report_errors(); +}