Skip to content

Commit

Permalink
update unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
dan-du-car committed Aug 21, 2024
1 parent 9e0b3fd commit 467dc70
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ TEST(TestMUSTSensorDetection, fromStringToDetectionClassification)
EXPECT_EQ(DetectionClassification::SEDAN, fromStringToDetectionClassification("sedan"));
EXPECT_EQ(DetectionClassification::VAN, fromStringToDetectionClassification("van"));
EXPECT_EQ(DetectionClassification::TRUCK, fromStringToDetectionClassification("truck"));
EXPECT_EQ(DetectionClassification::TRUCK, fromStringToDetectionClassification("bus"));
EXPECT_EQ(DetectionClassification::TRUCK, fromStringToDetectionClassification("pickup truck"));
EXPECT_EQ(DetectionClassification::TRUCK, fromStringToDetectionClassification("pedestrain"));
EXPECT_EQ(DetectionClassification::NA, fromStringToDetectionClassification("not_a_classification"));

}
Expand Down Expand Up @@ -78,6 +81,9 @@ TEST(TestMUSTSensorDetection, detectionClassificationToSensorDetectedObjectType
EXPECT_STRCASEEQ("SEDAN", detectionClassificationToSensorDetectedObjectType(DetectionClassification::SEDAN).c_str());
EXPECT_STRCASEEQ("VAN", detectionClassificationToSensorDetectedObjectType(DetectionClassification::VAN).c_str());
EXPECT_STRCASEEQ("TRUCK", detectionClassificationToSensorDetectedObjectType(DetectionClassification::TRUCK).c_str());
EXPECT_STRCASEEQ("BUS", detectionClassificationToSensorDetectedObjectType(DetectionClassification::BUS).c_str());
EXPECT_STRCASEEQ("PICKUP TRUCK", detectionClassificationToSensorDetectedObjectType(DetectionClassification::PICKUP_TRUCK).c_str());
EXPECT_STRCASEEQ("PEDESTRIAN", detectionClassificationToSensorDetectedObjectType(DetectionClassification::PEDESTRIAN).c_str());
EXPECT_THROW(detectionClassificationToSensorDetectedObjectType(DetectionClassification::NA).c_str(), std::runtime_error);

}
Expand Down

0 comments on commit 467dc70

Please sign in to comment.