C++ 如何解决“问题”;非void函数缺少返回值“;tromeloeil中的错误?

C++ 如何解决“问题”;非void函数缺少返回值“;tromeloeil中的错误?,c++,mocking,catch2,trompeloeil,C++,Mocking,Catch2,Trompeloeil,我试图弄清楚如何在C++11中使用Trompeloeil库。在这个例子中,我遇到了大量的构建错误,我不明白为什么 #define CATCH_CONFIG_MAIN #include "catch.hpp" #include <rapidcheck.h> #include <rapidcheck/state.h> #include <trompeloeil.hpp> #include "../../../include/Orion.h" #include ".

我试图弄清楚如何在C++11中使用Trompeloeil库。在这个例子中,我遇到了大量的构建错误,我不明白为什么

#define CATCH_CONFIG_MAIN
#include "catch.hpp"
#include <rapidcheck.h>
#include <rapidcheck/state.h>
#include <trompeloeil.hpp>
#include "../../../include/Orion.h"
#include "../../../include/optionCheckerFileHandler.h"

class mock{
  public:
  MAKE_MOCK1(getFileParams, int(int));
};

TEST_CASE( "Factorials are computed", "[factorial]" ) {
  using trompeloeil::_;  // wild card for matching any value
  using trompeloeil::gt; // greater-than match
  mock m;{
    REQUIRE_CALL_V(m, getFileParams(1)).RETURN(0);
  }
}
如果有人能帮我理解这些,我将不胜感激。我可以根据请求提供完整的构建错误

In file included from /home/adny/tortoiseSoftworks/software/gamedev/tortoiseGamedev/test/testing/src/main.cpp:5:0:
/home/adny/tortoiseSoftworks/software/gamedev/tortoiseGamedev/test/testing/src/main.cpp: In function ‘void ____C_A_T_C_H____T_E_S_T____0()’:
/home/adny/tortoiseSoftworks/software/gamedev/tortoiseGamedev/test/testing/lib/trompeloeil/include/trompeloeil.hpp:4727:3: error: ‘class std::unique_ptr<trompeloeil::expectation>’ has no member named ‘handle_return’
   handle_return(   
/home/adny/tortoiseSoftworks/software/gamedev/tortoiseGamedev/test/testing/lib/trompeloeil/include/trompeloeil.hpp:3891:7: error: static assertion failed: RETURN missing for non-void function
       static_assert(valid_return_type, "RETURN missing for non-void function");