Skip to content

Commit 56971cf

Browse files
committed
Fix unit tests.
1 parent 47d250a commit 56971cf

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

include/dynamic-graph/signal-caster.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
namespace dynamicgraph {
1919
/// Template class used to serialize a signal value.
2020
template <typename T> struct signal_disp {
21-
inline static void run (const T &value, std::ostream &os) { os << value << '\n'; }
21+
inline static void run (const T &value, std::ostream &os) { os << value; }
2222
};
2323

2424
/// Template specialization of signal_disp for Eigen objects

tests/debug-real-time-tracer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,5 +112,5 @@ BOOST_AUTO_TEST_CASE(test_tracer) {
112112
"TracerRealTime my-tracer [mode=play] : \n"
113113
" - Dep list: \n"
114114
" -> MyEntity(my-entity)::input(double)::out_double (in output)"
115-
" [9Ko/16Ko] \n"));
115+
" [8Ko/16Ko] \n"));
116116
}

tests/signal-cast-registerer.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -36,15 +36,15 @@ BOOST_AUTO_TEST_CASE(standard_double_registerer) {
3636
typedef std::pair<std::string, std::string> test_t;
3737
std::vector<test_t> values;
3838

39-
values.push_back(std::make_pair("42.0", "42\n"));
40-
values.push_back(std::make_pair("42.5", "42.5\n"));
41-
values.push_back(std::make_pair("-12.", "-12\n"));
39+
values.push_back(std::make_pair("42.0", "42"));
40+
values.push_back(std::make_pair("42.5", "42.5"));
41+
values.push_back(std::make_pair("-12.", "-12"));
4242

4343
// Double special values.
4444
// FIXME: these tests are failing :(
45-
values.push_back(std::make_pair("inf", "inf\n"));
46-
values.push_back(std::make_pair("-inf", "-inf\n"));
47-
values.push_back(std::make_pair("nan", "nan\n"));
45+
values.push_back(std::make_pair("inf", "inf"));
46+
values.push_back(std::make_pair("-inf", "-inf"));
47+
values.push_back(std::make_pair("nan", "nan"));
4848

4949
BOOST_FOREACH (const test_t &test, values) {
5050
// Set
@@ -55,14 +55,14 @@ BOOST_AUTO_TEST_CASE(standard_double_registerer) {
5555
{
5656
output_test_stream output;
5757
mySignal.get(output);
58-
BOOST_CHECK(output.is_equal(test.second));
58+
BOOST_CHECK_EQUAL(output.str(), test.second);
5959
}
6060

6161
// Trace
6262
{
6363
output_test_stream output;
6464
mySignal.trace(output);
65-
BOOST_CHECK(output.is_equal(test.second));
65+
BOOST_CHECK_EQUAL(output.str(), test.second);
6666
}
6767
}
6868

0 commit comments

Comments
 (0)