This is a set of unit tests testing the calibration process. More...
#include "sr_utilities/calibration.hpp"
#include <gtest/gtest.h>
#include <ros/ros.h>
#include <vector>
Go to the source code of this file.
Classes | |
class | CalibrationTest |
Functions | |
int | main (int argc, char **argv) |
TEST (Calibration2Points, before) | |
TEST (Calibration2Points, in) | |
TEST (Calibration2Points, after) | |
TEST (Calibration2Points, on) | |
TEST (Calibration3Points, before) | |
TEST (Calibration3Points, first_interval) | |
TEST (Calibration3Points, second_interval) | |
TEST (Calibration3Points, after) | |
TEST (Calibration3Points, on) | |
TEST (Calibration5Points, mixed_and_big_test) | |
This is a set of unit tests testing the calibration process.
Definition in file test_calibration.cpp.
int main | ( | int | argc, |
char ** | argv | ||
) |
Definition at line 392 of file test_calibration.cpp.
TEST | ( | Calibration2Points | , |
before | |||
) |
We test that the value generated by a two point table with a value asked before the table is correct: table: | 1.0 | 3.0 | | 2.0 | 5.0 |
calibration(0) = 1.0
Definition at line 57 of file test_calibration.cpp.
TEST | ( | Calibration2Points | , |
in | |||
) |
We test that the value generated by a two point table with a value asked in the table is correct: table: | 1.0 | 3.0 | | 2.0 | 5.0 |
calibration(1.5) = 4.0
Definition at line 85 of file test_calibration.cpp.
TEST | ( | Calibration2Points | , |
after | |||
) |
We test that the value generated by a two point table with a value asked after the table is correct: table: | 1.0 | 3.0 | | 2.0 | 5.0 |
calibration(3) = 7.0
Definition at line 112 of file test_calibration.cpp.
TEST | ( | Calibration2Points | , |
on | |||
) |
We test that the value generated by a two point table with a value asked on a point of the table is correct: table: | 1.0 | 3.0 | | 2.0 | 5.0 |
calibration(3) = 7.0
Definition at line 139 of file test_calibration.cpp.
TEST | ( | Calibration3Points | , |
before | |||
) |
We test that the value generated by a three point table with a value asked before the table is correct: table: | 1.0 | 3.0 | | 2.0 | 5.0 | | 3.0 | 4.0 |
calibration(0) = 1.0
Definition at line 174 of file test_calibration.cpp.
TEST | ( | Calibration3Points | , |
first_interval | |||
) |
We test that the value generated by a three point table with a value asked in the first interval is correct. table: | 1.0 | 3.0 | | 2.0 | 5.0 | | 3.0 | 4.0 |
calibration(1.5) = 4.0
Definition at line 205 of file test_calibration.cpp.
TEST | ( | Calibration3Points | , |
second_interval | |||
) |
We test that the value generated by a three point table with a value asked in the second interval is correct. table: | 1.0 | 3.0 | | 2.0 | 5.0 | | 3.0 | 4.0 |
calibration(2.5) = 4.5
Definition at line 236 of file test_calibration.cpp.
TEST | ( | Calibration3Points | , |
after | |||
) |
We test that the value generated by a three point table with a value asked after the table is correct. table: | 1.0 | 3.0 | | 2.0 | 5.0 | | 3.0 | 4.0 |
calibration(4.0) = 3.0
Definition at line 267 of file test_calibration.cpp.
TEST | ( | Calibration3Points | , |
on | |||
) |
We test that the value generated by a three point table with a value asked on a point of the table is correct. table: | 1.0 | 3.0 | | 2.0 | 5.0 | | 3.0 | 4.0 |
calibration(2.0) = 5.0
Definition at line 298 of file test_calibration.cpp.
TEST | ( | Calibration5Points | , |
mixed_and_big_test | |||
) |
We test that the values generated by a five points table with the table being initialised in the wrong order. table: | 1.0 | -2.0 | | 2.0 | 0.0 | | 3.0 | -4.0 | | 5.0 | 6.0 | | 10. | 0.0 |
calibration(0.0) = -4.0 calibration(1.0) = -2.0 calibration(1.5) = -1.0 calibration(2.0) = 0.0 calibration(2.5) = -2.0 calibration(3.0) = -4.0 calibration(4.0) = 1.0 calibration(5.0) = 6.0 calibration(7.5) = 3.0 calibration(10.) = 0.0 calibration(15.) = -6.0
Definition at line 344 of file test_calibration.cpp.