12
12
// See the License for the specific language governing permissions and
13
13
// limitations under the License.
14
14
15
- #include < gtest/gtest.h>
16
15
#include " tensorrt_common/tensorrt_common.hpp"
17
16
17
+ #include < gtest/gtest.h>
18
+
18
19
// test get_input_dims function
19
- TEST (TrtCommonTest, TestGetInputDims) {
20
- std::string onnx_file_path = " src/universe/autoware.universe/common/tensorrt_common/data/yolov5s.onnx" ;
20
+ TEST (TrtCommonTest, TestGetInputDims)
21
+ {
22
+ std::string onnx_file_path =
23
+ " src/universe/autoware.universe/common/tensorrt_common/data/yolov5s.onnx" ;
21
24
nvinfer1::Dims input_dims = tensorrt_common::get_input_dims (onnx_file_path);
22
25
ASSERT_GT (input_dims.nbDims , 0 );
23
26
}
24
27
25
28
// test is_valid_precision_string function
26
- TEST (TrtCommonTest, TestIsValidPrecisionString) {
29
+ TEST (TrtCommonTest, TestIsValidPrecisionString)
30
+ {
27
31
std::string valid_precision = " fp16" ;
28
32
std::string invalid_precision = " invalid_precision" ;
29
33
ASSERT_TRUE (tensorrt_common::is_valid_precision_string (valid_precision));
@@ -32,7 +36,8 @@ TEST(TrtCommonTest, TestIsValidPrecisionString) {
32
36
33
37
// In the future, more test cases will be written to test the functionality of TrtCommon class
34
38
35
- int main (int argc, char * argv[]) {
36
- testing::InitGoogleTest (&argc, argv);
37
- return RUN_ALL_TESTS ();
39
+ int main (int argc, char * argv[])
40
+ {
41
+ testing::InitGoogleTest (&argc, argv);
42
+ return RUN_ALL_TESTS ();
38
43
}
0 commit comments