Unit tests for the PeripheralController class. More...
Go to the source code of this file.
Functions | |
TEST (PeripheralControllerTest, TestServoPWM) | |
Ensures that set_servo_pwm() is called with the correct parameters. | |
TEST (PeripheralControllerTest, TestMotorPWM) | |
Ensures that set_motor_pwm() is called with the correct parameters. | |
TEST (PeripheralControllerTest, TestInitServo) | |
Ensures that init_servo() is called. | |
TEST (PeripheralControllerTest, TestInitMotors) | |
Ensures that init_motors() is called. | |
TEST (PeripheralControllerTest, TestI2CWriteByteData) | |
Ensures that i2c_smbus_write_byte_data() is called with the correct parameters. | |
TEST (PeripheralControllerTest, TestI2CReadByteData) | |
Ensures that i2c_smbus_read_byte_data() is called with the correct parameters. | |
TEST (PeripheralControllerTest, TestWriteByteDataException) | |
Ensures that write_byte_data() throws a runtime_error exception. | |
TEST (PeripheralControllerTest, TestReadByteDataException) | |
Ensures that read_byte_data() throws a runtime_error exception. | |
Unit tests for the PeripheralController class.
This file contains unit tests for the PeripheralController class, using Google Test and Google Mock frameworks.
Definition in file test_PeripheralController.cpp.
TEST | ( | PeripheralControllerTest | , |
TestI2CReadByteData | ) |
Ensures that i2c_smbus_read_byte_data() is called with the correct parameters.
This test verifies that i2c_smbus_read_byte_data() is called with the correct parameters and returns the expected result.
Definition at line 125 of file test_PeripheralController.cpp.
TEST | ( | PeripheralControllerTest | , |
TestI2CWriteByteData | ) |
Ensures that i2c_smbus_write_byte_data() is called with the correct parameters.
This test verifies that i2c_smbus_write_byte_data() is called with the correct parameters and returns the expected result.
Definition at line 104 of file test_PeripheralController.cpp.
TEST | ( | PeripheralControllerTest | , |
TestInitMotors | ) |
Ensures that init_motors() is called.
This test verifies that init_motors() is called.
Definition at line 86 of file test_PeripheralController.cpp.
TEST | ( | PeripheralControllerTest | , |
TestInitServo | ) |
Ensures that init_servo() is called.
This test verifies that init_servo() is called.
Definition at line 70 of file test_PeripheralController.cpp.
TEST | ( | PeripheralControllerTest | , |
TestMotorPWM | ) |
Ensures that set_motor_pwm() is called with the correct parameters.
This test verifies that set_motor_pwm() is called with the correct parameters.
Definition at line 52 of file test_PeripheralController.cpp.
TEST | ( | PeripheralControllerTest | , |
TestReadByteDataException | ) |
Ensures that read_byte_data() throws a runtime_error exception.
This test verifies that read_byte_data() throws a runtime_error exception when the I2C read fails.
Definition at line 164 of file test_PeripheralController.cpp.
TEST | ( | PeripheralControllerTest | , |
TestServoPWM | ) |
Ensures that set_servo_pwm() is called with the correct parameters.
This test verifies that set_servo_pwm() is called with the correct parameters.
Definition at line 33 of file test_PeripheralController.cpp.
TEST | ( | PeripheralControllerTest | , |
TestWriteByteDataException | ) |
Ensures that write_byte_data() throws a runtime_error exception.
This test verifies that write_byte_data() throws a runtime_error exception when the I2C write fails.
Definition at line 145 of file test_PeripheralController.cpp.