You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
trompeloeil/test/custom_recursive_mutex.cpp

30 lines
551 B
C++

#define TROMPELOEIL_CUSTOM_RECURSIVE_MUTEX
#include <trompeloeil.hpp>
namespace trompeloeil {
std::unique_ptr<custom_recursive_mutex> create_custom_recursive_mutex() {
class custom : public custom_recursive_mutex {
void lock() override { mtx.lock(); }
void unlock() override { mtx.unlock(); }
private:
std::recursive_mutex mtx;
};
return std::unique_ptr<custom>(new custom);
}
} // namespace trompeloeil
class C {
public:
MAKE_MOCK0(func, int(void));
};
int main() {
C c;
std::puts("Pass! (the program compiled)");
}