Gmock Exception - 测试体中字符串太长

时间:2018-01-10 08:14:59

标签: c++ gmock

我已经为类编写了模拟实现,一切正常,直到我必须检查接受参数的函数的调用。

目前我正在使用gmock通配符来表示接受2个参数,这就是抛出异常

unknown file: error: C++ exception with description "string too long" thrown in the test body.

以下是测试用例正文:

TEST_F (Test, CheckFunction)
{
   EXPECT_CALL(*ptr, Func1(testing::_, testing:: _)).Times(testing::AtLeast(1));
   EXPECT_TRUE(helperptr->func1("{}", false));
}

我已经创建了一个测试夹具,并且在setUp中初始化了对象。

知道为什么以及如何引发此异常?

0 个答案:

没有答案
相关问题