Unit tests for the MileageCalculator class. More...
Go to the source code of this file.
Data Structures | |
class | MileageCalculatorTest |
Test fixture for testing the MileageCalculator class. More... | |
Functions | |
TEST_F (MileageCalculatorTest, AddSpeed_DoesNotCrash) | |
Ensures that the mileage calculator does not crash when adding speeds. | |
TEST_F (MileageCalculatorTest, CalculateDistance_NoSpeeds_ReturnsZero) | |
Ensures that the mileage calculator calculates the distance correctly. | |
TEST_F (MileageCalculatorTest, CalculateDistance_ZeroSpeed_ReturnsZero) | |
Ensures that the mileage calculator calculates the distance correctly. | |
TEST_F (MileageCalculatorTest, CalculateDistance_BasicCalculation) | |
Ensures that the mileage calculator calculates the distance correctly. | |
TEST_F (MileageCalculatorTest, CalculateDistance_MultipleSpeeds) | |
Ensures that the mileage calculator calculates the distance correctly. | |
Unit tests for the MileageCalculator class.
This file contains unit tests for the MileageCalculator class, using Google Test and Google Mock frameworks.
Definition in file test_MileageCalculator.cpp.
TEST_F | ( | MileageCalculatorTest | , |
AddSpeed_DoesNotCrash | ) |
Ensures that the mileage calculator does not crash when adding speeds.
This test verifies that the mileage calculator does not crash when adding speeds.
Definition at line 43 of file test_MileageCalculator.cpp.
TEST_F | ( | MileageCalculatorTest | , |
CalculateDistance_BasicCalculation | ) |
Ensures that the mileage calculator calculates the distance correctly.
This test verifies that the mileage calculator calculates the distance correctly.
Definition at line 90 of file test_MileageCalculator.cpp.
TEST_F | ( | MileageCalculatorTest | , |
CalculateDistance_MultipleSpeeds | ) |
Ensures that the mileage calculator calculates the distance correctly.
This test verifies that the mileage calculator calculates the distance correctly.
Definition at line 120 of file test_MileageCalculator.cpp.
TEST_F | ( | MileageCalculatorTest | , |
CalculateDistance_NoSpeeds_ReturnsZero | ) |
Ensures that the mileage calculator calculates the distance correctly.
This test verifies that the mileage calculator calculates the distance correctly.
Definition at line 59 of file test_MileageCalculator.cpp.
TEST_F | ( | MileageCalculatorTest | , |
CalculateDistance_ZeroSpeed_ReturnsZero | ) |
Ensures that the mileage calculator calculates the distance correctly.
This test verifies that the mileage calculator calculates the distance correctly.
Definition at line 73 of file test_MileageCalculator.cpp.