Skip to content
Snippets Groups Projects
Commit 8835737a authored by Florent Lamiraux's avatar Florent Lamiraux
Browse files

Add a test to check Value assignment operator.

    * unitTesting/CMakeLists.txt,
    * unitTesting/test-value.cpp: new.
parent 49af4cb5
No related branches found
No related tags found
No related merge requests found
...@@ -20,7 +20,8 @@ include_directories(${Boost_INCLUDE_DIRS}) ...@@ -20,7 +20,8 @@ include_directories(${Boost_INCLUDE_DIRS})
SET(tests_exe SET(tests_exe
test_pool test_pool
test_depend test_depend
test_signalcast) test_signalcast
test-value)
SET(tests_libs SET(tests_libs
test_signalcast_libA test_signalcast_libA
...@@ -40,7 +41,7 @@ FOREACH(test_name ${tests_libs}) ...@@ -40,7 +41,7 @@ FOREACH(test_name ${tests_libs})
ADD_LIBRARY(${LIBRARY_NAME} ADD_LIBRARY(${LIBRARY_NAME}
SHARED SHARED
${test_name}.cpp) ${test_name}.cpp)
PKG_CONFIG_USE_DEPENDENCY(${LIBRARY_NAME} jrl-mal)
TARGET_LINK_LIBRARIES(${LIBRARY_NAME} TARGET_LINK_LIBRARIES(${LIBRARY_NAME}
${PROJECT_NAME}) ${PROJECT_NAME})
ADD_DEPENDENCIES(${LIBRARY_NAME} ADD_DEPENDENCIES(${LIBRARY_NAME}
...@@ -57,7 +58,7 @@ FOREACH(test_name ${tests_exe}) ...@@ -57,7 +58,7 @@ FOREACH(test_name ${tests_exe})
${PROJECT_NAME}) ${PROJECT_NAME})
ADD_DEPENDENCIES(${EXECUTABLE_NAME} ADD_DEPENDENCIES(${EXECUTABLE_NAME}
${PROJECT_NAME}) ${PROJECT_NAME})
PKG_CONFIG_USE_DEPENDENCY(${EXECUTABLE_NAME} jrl-mal)
TARGET_LINK_LIBRARIES(${EXECUTABLE_NAME} TARGET_LINK_LIBRARIES(${EXECUTABLE_NAME}
${${test_name}_additional_libs}) ${${test_name}_additional_libs})
......
/*
* Copyright 2010,
* Florent Lamiraux
*
* CNRS/LAAS
*
* This file is part of dynamic-graph.
* dynamic-graph is free software: you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
* as published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version.
* dynamic-graph is distributed in the hope that it will be
* useful, but WITHOUT ANY WARRANTY; without even the implied warranty
* of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details. You should
* have received a copy of the GNU Lesser General Public License along
* with dynamic-graph. If not, see <http://www.gnu.org/licenses/>.
*/
/* -------------------------------------------------------------------------- */
/* --- INCLUDES ------------------------------------------------------------- */
/* -------------------------------------------------------------------------- */
#include <iostream>
#include "dynamic-graph/value.h"
int main()
{
using dynamicgraph::command::Value;
std::string str1("value #1");
Value value1(str1);
Value value = value1;
std::cout << "value1 = " << value1 << std::endl;
std::cout << "value = " << value << std::endl;
std::string str2("value #2");
Value value2(str2);
value = value2;
std::cout << "value2 = " << value2 << std::endl;
std::cout << "value = " << value << std::endl;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment