mockcpp icon indicating copy to clipboard operation
mockcpp copied to clipboard

Two C/C++ testing tools, mockcpp and testngpp.

Results 34 mockcpp issues
Sort by recently updated
recently updated
newest added

The error information is: ``` mockcpp/ApiHookGenerator.h(52,34): error C2039: 'freeApiHook': is not a member of 'mockcpp::ApiHookFunctor' ``` I think this issue may be related to the code below in https://github.com/sinojelly/mockcpp/blob/master/include/mockcpp/ApiHookFunctor.h ```...

The failed tests are: ``` --------------------SUITE: TestFormatter-------------------- (TestFormatter) ................. [ FAILED ] testShouldBeAbleToStringnizeVerySmallDouble - TestFormatter.h:234: expected (expected == toTypeAndValueString(d)), found ((std::string)"(double)1e-022" != (std::string)"(double)1e-22") ..... [ FAILED ] testShouldBeAbleToStringnizeVerySmallFloat - TestFormatter.h:280:...

The crashed tests are: ``` ---------------------SUITE: TestApiHook--------------------- (ApiHook) [ ERROR ] can mock C function - TestApiHook.h:66: hardware exception STATUS_ACCESS_VIOLATION raised in setup or running test [ ERROR ] can...

``` template void foo(T &t); void bar() { MOCKABLE(foo); // compile error struct A {}a; foo(a); } ``` Original issue reported on code.google.com by `[email protected]` on 4 Jun 2010 at...

Priority-Medium
Type-Defect
auto-migrated

When using the MOCKER in the following way, the expectation is: func1, func1, func2; however, during actual runtime, the second rule for func1 is skipped, and the stubbing effect becomes...

需要测试的代码 ``` void nfs4_op_getattr_Free(nfs_resop4 *res) { GETATTR4res *resp = &res->nfs_resop4_u.opgetattr; if (resp->status == NFS4_OK) nfs4_Fattr_Free(&resp->GETATTR4res_u.resok4.obj_attributes); } ``` 测试代码 ``` TEST_F(Nfs4OpGetattrFreeTest, StatusIsNFS4_OK) { res.nfs_resop4_u.opgetattr.status = NFS4_OK; MOCKER(nfs4_Fattr_Free) .expect(once()) .with(any()); nfs4_op_getattr_Free(&res); GlobalMockObject::verify();...

工程是gtest+mockcpp ** linux版本:** ubuntu 22.04 Linux openbmc 6.5.0-35-generic #35~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Tue May 7 09:00:52 UTC 2 x86_64 x86_64 x86_64 GNU/Linux ** gcc版本:** gcc (Ubuntu 12.3.0-1ubuntu1~22.04) 12.3.0 ** c++标准:** c++20...

Fix compiler warnings for: - unused variables. - reorder member initialization. - type qualifiers ignored on function return type.

Improve portability of Makefiles by finding the `cmake` tool in the user's path, rather than hardcoding it. On MSYS2 environment, `cmake` is located at: - `/ucrt64/bin/cmake` (for UCRT64 environment) -...