|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r77084 - in trunk/libs/local_function: doc test
From: lorcaminiti_at_[hidden]
Date: 2012-02-20 16:46:47
Author: lcaminiti
Date: 2012-02-20 16:46:46 EST (Mon, 20 Feb 2012)
New Revision: 77084
URL: http://svn.boost.org/trac/boost/changeset/77084
Log:
Renamed add_params test to add_params_only (and updated docs).
Added:
trunk/libs/local_function/test/add_params_only.cpp
- copied, changed from r77082, /trunk/libs/local_function/test/add_params.cpp
trunk/libs/local_function/test/add_params_only_seq.cpp
- copied, changed from r77082, /trunk/libs/local_function/test/add_params_seq.cpp
Removed:
trunk/libs/local_function/test/add_params.cpp
trunk/libs/local_function/test/add_params_seq.cpp
Text files modified:
trunk/libs/local_function/doc/local_function.qbk | 2 +-
trunk/libs/local_function/doc/tutorial.qbk | 4 ++--
trunk/libs/local_function/test/Jamfile.v2 | 2 +-
trunk/libs/local_function/test/add_params_only.cpp | 6 +++---
trunk/libs/local_function/test/add_params_only_seq.cpp | 4 ++--
5 files changed, 9 insertions(+), 9 deletions(-)
Modified: trunk/libs/local_function/doc/local_function.qbk
==============================================================================
--- trunk/libs/local_function/doc/local_function.qbk (original)
+++ trunk/libs/local_function/doc/local_function.qbk 2012-02-20 16:46:46 EST (Mon, 20 Feb 2012)
@@ -65,7 +65,7 @@
[import ../test/add.cpp]
[import ../test/add_seq.cpp]
[import ../test/add_lambda.cpp]
-[import ../test/add_params.cpp]
+[import ../test/add_params_only.cpp]
[import ../test/ten_void.cpp]
[import ../test/add_this.cpp]
[import ../test/add_template.cpp]
Modified: trunk/libs/local_function/doc/tutorial.qbk
==============================================================================
--- trunk/libs/local_function/doc/tutorial.qbk (original)
+++ trunk/libs/local_function/doc/tutorial.qbk 2012-02-20 16:46:46 EST (Mon, 20 Feb 2012)
@@ -46,9 +46,9 @@
BOOST_LOCAL_FUNCTION(``[^/parameter-type1 parameter-name1/]``,`` [^/parameter-type2 parameter-name2, .../]``)
The maximum number of parameters that can be passed to a local function is controlled at compile-time by the configuration macro [macroref BOOST_LOCAL_FUNCTION_CONFIG_ARITY_MAX].
-For example, let's program a local function named `add` that adds together two integers `x` and `y` (see also [@../../test/add_params.cpp =add_params.cpp=]):
+For example, let's program a local function named `add` that adds together two integers `x` and `y` (see also [@../../test/add_params_only.cpp =add_params_only.cpp=]):
-[add_params]
+[add_params_only]
If the local function has no parameter, it is possible to pass `void` to the [macroref BOOST_LOCAL_FUNCTION] macro (similarly to the C syntax that allows to use [^['result-type function-name]]`(void)` to declare a function with no parameter):
[footnote
Modified: trunk/libs/local_function/test/Jamfile.v2
==============================================================================
--- trunk/libs/local_function/test/Jamfile.v2 (original)
+++ trunk/libs/local_function/test/Jamfile.v2 2012-02-20 16:46:46 EST (Mon, 20 Feb 2012)
@@ -33,7 +33,7 @@
run-vaseq add_except ;
run-vaseq add_inline ;
run add_lambda.cpp ;
-run-vaseq add_params ;
+run-vaseq add_params_only ;
run-vaseq add_template ;
run-vaseq add_this ;
run-vaseq add_typed ;
Deleted: trunk/libs/local_function/test/add_params.cpp
==============================================================================
--- trunk/libs/local_function/test/add_params.cpp 2012-02-20 16:46:46 EST (Mon, 20 Feb 2012)
+++ (empty file)
@@ -1,30 +0,0 @@
-
-// Copyright (C) 2009-2012 Lorenzo Caminiti
-// Distributed under the Boost Software License, Version 1.0
-// (see accompanying file LICENSE_1_0.txt or a copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-// Home at http://www.boost.org/libs/local_function
-
-#include <boost/config.hpp>
-#ifndef BOOST_NO_VARIADIC_MACROS
-
-#include <boost/local_function.hpp>
-#define BOOST_TEST_MODULE TestAddParams
-#include <boost/test/unit_test.hpp>
-
-BOOST_AUTO_TEST_CASE(test_add_params) {
- //[add_params
- int BOOST_LOCAL_FUNCTION(int x, int y) { // Local function.
- return x + y;
- } BOOST_LOCAL_FUNCTION_NAME(add)
-
- BOOST_CHECK(add(1, 2) == 3); // Local function call.
- //]
-}
-
-#else
-
-int main(void) { return 0; } // Trivial test.
-
-#endif
-
Copied: trunk/libs/local_function/test/add_params_only.cpp (from r77082, /trunk/libs/local_function/test/add_params.cpp)
==============================================================================
--- /trunk/libs/local_function/test/add_params.cpp (original)
+++ trunk/libs/local_function/test/add_params_only.cpp 2012-02-20 16:46:46 EST (Mon, 20 Feb 2012)
@@ -9,11 +9,11 @@
#ifndef BOOST_NO_VARIADIC_MACROS
#include <boost/local_function.hpp>
-#define BOOST_TEST_MODULE TestAddParams
+#define BOOST_TEST_MODULE TestAddParamsOnly
#include <boost/test/unit_test.hpp>
-BOOST_AUTO_TEST_CASE(test_add_params) {
- //[add_params
+BOOST_AUTO_TEST_CASE(test_add_params_only) {
+ //[add_params_only
int BOOST_LOCAL_FUNCTION(int x, int y) { // Local function.
return x + y;
} BOOST_LOCAL_FUNCTION_NAME(add)
Copied: trunk/libs/local_function/test/add_params_only_seq.cpp (from r77082, /trunk/libs/local_function/test/add_params_seq.cpp)
==============================================================================
--- /trunk/libs/local_function/test/add_params_seq.cpp (original)
+++ trunk/libs/local_function/test/add_params_only_seq.cpp 2012-02-20 16:46:46 EST (Mon, 20 Feb 2012)
@@ -6,10 +6,10 @@
// Home at http://www.boost.org/libs/local_function
#include <boost/local_function.hpp>
-#define BOOST_TEST_MODULE TestAddParamsSeq
+#define BOOST_TEST_MODULE TestAddParamsOnlySeq
#include <boost/test/unit_test.hpp>
-BOOST_AUTO_TEST_CASE(test_add_params_seq) {
+BOOST_AUTO_TEST_CASE(test_add_params_only_seq) {
int BOOST_LOCAL_FUNCTION( (int x) (int y) ) {
return x + y;
} BOOST_LOCAL_FUNCTION_NAME(add)
Deleted: trunk/libs/local_function/test/add_params_seq.cpp
==============================================================================
--- trunk/libs/local_function/test/add_params_seq.cpp 2012-02-20 16:46:46 EST (Mon, 20 Feb 2012)
+++ (empty file)
@@ -1,19 +0,0 @@
-
-// Copyright (C) 2009-2012 Lorenzo Caminiti
-// Distributed under the Boost Software License, Version 1.0
-// (see accompanying file LICENSE_1_0.txt or a copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-// Home at http://www.boost.org/libs/local_function
-
-#include <boost/local_function.hpp>
-#define BOOST_TEST_MODULE TestAddParamsSeq
-#include <boost/test/unit_test.hpp>
-
-BOOST_AUTO_TEST_CASE(test_add_params_seq) {
- int BOOST_LOCAL_FUNCTION( (int x) (int y) ) {
- return x + y;
- } BOOST_LOCAL_FUNCTION_NAME(add)
-
- BOOST_CHECK(add(1, 2) == 3);
-}
-
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk