Skip to content

Commit 96809f1

Browse files
Fixed broken test
1 parent 3fa1c6f commit 96809f1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/sam_test.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,8 @@ TEST_F(SamInferenceTest, CreateSessionWithValidModel)
7171
TEST_F(SamInferenceTest, CreateSessionWithInvalidModel)
7272
{
7373
params_encoder.modelPath = "nonexistent_model.onnx";
74-
const char* result = samSegmentors[0]->CreateSession(params_encoder);
75-
EXPECT_NE(result, nullptr) << "CreateSession should fail with invalid model path";
74+
EXPECT_THROW(samSegmentors[0]->CreateSession(params_encoder), std::runtime_error)
75+
<< "CreateSession should throw an exception with invalid model path";
7676
}
7777

7878
// End-to-end check: with both encoder/decoder models present, the pipeline runs

0 commit comments

Comments
 (0)