42 #include <gtest/gtest.h> 44 #include "calibration_msgs/Interval.h" 51 typedef boost::function<void (const calibration_msgs::IntervalConstPtr &)>
Input;
54 void publish(
const calibration_msgs::Interval &interval)
57 output_stream <<
"[" << interval.start <<
", " << interval.end <<
"] ";
62 interval->start = start;
65 inputs[input_num](interval);
68 TEST(Intersection, testCase1)
73 for (
int i=0; i<n; i++) {
86 string correct_answer =
"[10.000000000, 16.000000000] [10.000000000, 20.000000000] [23.000000000, 23.000000000] [23.000000000, 25.000000000] ";
92 int main(
int argc,
char **argv){
93 testing::InitGoogleTest(&argc, argv);
94 return RUN_ALL_TESTS();
boost::function< void(const calibration_msgs::IntervalConstPtr &)> getNewInputStream()
stringstream output_stream
int main(int argc, char **argv)
TEST(Intersection, testCase1)
boost::function< void(const calibration_msgs::IntervalConstPtr &)> Input
void publish(const calibration_msgs::Interval &interval)
void input_interval(ros::Time start, ros::Time end, int input_num)