fakeit

[full]

FakeIt is a simple mocking framework for C++.

Join the chat at https://gitter.im/eranpeer/FakeIt

Linux / GCC: Build status Linux/GCC Coverage Status

Linux / Clang: Build status Linux/Clang

MSC: Build status MSC

FakeIt is a simple mocking framework for C++. It supports GCC, Clang and MS Visual C++.

FakeIt is written in C++11 and can be used for testing both C++11 and C++ projects.

struct SomeInterface {
	virtual int foo(int) = 0;
	virtual int bar(string) = 0;
};
// Instantiate a mock object.
Mock<SomeInterface> mock;

// Setup mock behavior.
When(Method(mock,foo)).Return(1); // Method mock.foo will return 1 once.

// Fetch the mock instance.
SomeInterface &i = mock.get();

// Will print "1". 
cout << i.foo(0);


... More
license MIT
project fakeit
url github.com/eranpeer/FakeIt
topics C++mockingfaking
2 Versions
version 2.3.2
repository https://pkg.cppget.org/1/stable
depends 0
requires 1; c++11
reviews +1
version 2.3.0
repository https://pkg.cppget.org/1/stable
depends 0
requires 1; c++11
reviews +1