File tree Expand file tree Collapse file tree 2 files changed +18
-21
lines changed Expand file tree Collapse file tree 2 files changed +18
-21
lines changed Original file line number Diff line number Diff line change @@ -76,18 +76,16 @@ void DefaultCastRegisterer<dynamicgraph::Matrix>::trace(
76
76
// for std::string, do not check failure. If input stream contains an
77
77
// empty string, iss.fail() returns true and an exception is thrown
78
78
template <>
79
- inline boost::any DefaultCastRegisterer<std::string>::cast
80
- (std::istringstream &iss)
81
- {
82
- std::string inst (iss.str ());
79
+ inline boost::any
80
+ DefaultCastRegisterer<std::string>::cast(std::istringstream &iss) {
81
+ std::string inst (iss.str ());
83
82
return inst;
84
83
}
85
84
86
85
// for std::string, do not add std::endl at the end of the stream.
87
86
template <>
88
- inline void DefaultCastRegisterer<std::string>::disp
89
- (const boost::any &object, std::ostream &os)
90
- {
87
+ inline void DefaultCastRegisterer<std::string>::disp(const boost::any &object,
88
+ std::ostream &os) {
91
89
os << boost::any_cast<std::string>(object);
92
90
}
93
91
Original file line number Diff line number Diff line change @@ -87,26 +87,25 @@ BOOST_AUTO_TEST_CASE(normal_test) {
87
87
cout << std::endl;
88
88
}
89
89
90
- BOOST_AUTO_TEST_CASE (plug_signal_string)
91
- {
90
+ BOOST_AUTO_TEST_CASE (plug_signal_string) {
92
91
Signal<std::string, int > outSig (" output" );
93
- SignalPtr<std::string, int > inSig (NULL , " input" );
92
+ SignalPtr<std::string, int > inSig (NULL , " input" );
94
93
95
- std::string str (" two words" );
94
+ std::string str (" two words" );
96
95
outSig.setConstant (str);
97
- inSig.plug (&outSig);
96
+ inSig.plug (&outSig);
98
97
inSig.recompute (1 );
99
98
std::ostringstream os1;
100
- inSig.get (os1);
101
- std::string res (os1.str ());
102
- BOOST_CHECK (res == str);
99
+ inSig.get (os1);
100
+ std::string res (os1.str ());
101
+ BOOST_CHECK (res == str);
103
102
104
- Signal<std::string, int > s (" signal" );
103
+ Signal<std::string, int > s (" signal" );
105
104
std::ostringstream os2;
106
- s.setConstant (str);
107
- os2.clear ();
108
- s.get (os2);
109
- res = os2.str ();
105
+ s.setConstant (str);
106
+ os2.clear ();
107
+ s.get (os2);
108
+ res = os2.str ();
110
109
std::cout << " res=" << res << std::endl;
111
- BOOST_CHECK (res == str);
110
+ BOOST_CHECK (res == str);
112
111
}
You can’t perform that action at this time.
0 commit comments