add GetLastErrorAfterSuccessfulCreate testcase
This commit is contained in:
@@ -467,7 +467,7 @@ TEST(XYParserApiTests, CreateAndDestroyMultipleParsers)
|
||||
}
|
||||
// 析构时自动销毁所有解析器
|
||||
}
|
||||
/*
|
||||
|
||||
/// 测试:GetLastError 在正常操作后
|
||||
TEST(XYParserApiTests, GetLastErrorAfterSuccessfulCreate)
|
||||
{
|
||||
@@ -477,11 +477,7 @@ TEST(XYParserApiTests, GetLastErrorAfterSuccessfulCreate)
|
||||
// 正常操作后,错误信息应为空或无错误
|
||||
const char* error = XYParser_GetLastError(parser.get());
|
||||
// 错误信息可能为空或特定实现
|
||||
EXPECT_EQ(error, nullptr);
|
||||
}
|
||||
|
||||
/// 测试:GetLastError 在空句柄上
|
||||
TEST(XYParserApiTests, GetLastErrorReturnsMessageForNullParser)
|
||||
{
|
||||
EXPECT_EQ(std::string(XYParser_GetLastError(nullptr)), std::string("invalid parser handle"));
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
Reference in New Issue
Block a user