Skip to content

Commit cf7be05

Browse files
Fixed broken test
1 parent b2fc9d4 commit cf7be05

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/yolo_test.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,8 @@ TEST_F(YoloInferenceTest, CreateSessionWithValidModel)
7676
TEST_F(YoloInferenceTest, CreateSessionWithInvalidModel)
7777
{
7878
params.modelPath = "nonexistent_model.onnx";
79-
const char* result = yolo->CreateSession(params);
80-
EXPECT_NE(result, nullptr) << "CreateSession should fail with invalid model path";
79+
EXPECT_THROW(yolo->CreateSession(params), std::runtime_error)
80+
<< "CreateSession should throw an exception with invalid model path";
8181
}
8282

8383
TEST_F(YoloInferenceTest, FullInferencePipeline)

0 commit comments

Comments
 (0)