![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
C++
brasy
写在十年之际,女程序员的码路历程。依然记得让你燃情的日子,且码且快乐!
展开
-
gmock: function has no default action set, and its return type has no default value set…
Issue分析:getAll()被多次调用,每次调用后,返回值不一样,不能分开写每次调用写一个EXPECT_CALL,也不能使用repeatedly,需要按照调用顺序,每次调用分别返回。如下code,跑UT不行,提示上面的failure.解决:UT gmock的时候,每次expect返回值不同,需要使用WillOnce分别写,但是要格式对齐。这样才能满足UT很有用,也很重要,慢慢来...原创 2020-12-29 17:05:01 · 824 阅读 · 0 评论 -
undefined reference to `boost::gregorian::greg_month::as_short_string() const‘
Issue:cmake --coverage cmake/cMakeLists/… 使用cmake做UT的coverage,找不到定义/boost/date_time/date_formatting.hpp:45: undefined reference to boost::gregorian::greg_month::as_short_string() const' /boost/date_time/date_formatting.hpp:50: undefined reference to boos原创 2020-12-29 16:58:07 · 1123 阅读 · 0 评论