We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3fa1c6f commit 96809f1Copy full SHA for 96809f1
test/sam_test.cpp
@@ -71,8 +71,8 @@ TEST_F(SamInferenceTest, CreateSessionWithValidModel)
71
TEST_F(SamInferenceTest, CreateSessionWithInvalidModel)
72
{
73
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";
+ EXPECT_THROW(samSegmentors[0]->CreateSession(params_encoder), std::runtime_error)
+ << "CreateSession should throw an exception with invalid model path";
76
}
77
78
// End-to-end check: with both encoder/decoder models present, the pipeline runs
0 commit comments