나는 내가 원하는 것을하기 위해 다음 테스트를 얻었다.Google 테스트 - void * 매개 변수로 배열 비교
MOCK_METHOD2(write, void(unsigned char*, int));
unsigned char bar[] = {1,2,3};
EXPECT_CALL(foo, write(_, sizeof(bar))).With((ElementsAreArray(bar)));
그러나 아래의 함수에 대해 매개 변수 유형을 void *로 변경하면 컴파일되지 않습니다. 오류와
MOCK_METHOD2(write, void(void*, int));
:
error C2182: 'abstract declarator' : illegal use of type 'void'
gmock-matchers.h(2536) : see reference to class template instantiation 'testing::internal::ElementsAreMatcherImpl<Container>' being compiled
with
[
Container=const std::tuple<void *,unsigned char>
]
이 내가 생각 의미가 있습니다,하지만 난 인수가 여기에 있어야 할 무효 *, 여기서이 문제를 해결하는 방법을 찾을 수 없습니다. 이 문제를 해결할 가능성이 있습니까?