¡@

Home 

c++ Programming Glossary: mock

Why is GoogleMock leaking my shared_ptr?

http://stackoverflow.com/questions/10286514/why-is-googlemock-leaking-my-shared-ptr

some strange behavior when a matcher has a shared_ptr to a mock as a parameter and EXPECT is called on the same shared_ptr... the same shared_ptr. The offending piece of code #include gmock gmock.h #include gtest gtest.h #include boost shared_ptr.hpp.. shared_ptr. The offending piece of code #include gmock gmock.h #include gtest gtest.h #include boost shared_ptr.hpp #include..

Interfaces vs Templates for dependency injection in C++

http://stackoverflow.com/questions/1127918/interfaces-vs-templates-for-dependency-injection-in-c

severel objects that can be either production code or fake mock objects let's call these injection objects . I have done this.. interface that both the production code class and the fake mock class inherits. Making the class under test a template class.. Are there other solutions to this problem c unit testing mocking share improve this question I think interface option..

Problems with Singleton Pattern

http://stackoverflow.com/questions/1392315/problems-with-singleton-pattern

singletons use static methods which are difficult to be mocked or stubbed they can cause problems. Not sure about this. Can.. stub out the singleton as effectively and your use of mock objects becomes difficult to use there are ways around this..

Comparison of arrays in google test?

http://stackoverflow.com/questions/1460703/comparison-of-arrays-in-google-test

at Google C Mocking Framework . Even if you don't want to mock anything it allows you to write rather complicated assertions..

Boost.Test: Looking for a working non-Trivial Test Suite Example / Tutorial

http://stackoverflow.com/questions/2906095/boost-test-looking-for-a-working-non-trivial-test-suite-example-tutorial

that can be run independently. I'll also be using a mock server to test various networking edge cases. I'm on Ubuntu.. in a single file it works fine. c unit testing boost tcp mocking share improve this question C Unit Testing With Boost.Test..

Advice on Mocking System Calls

http://stackoverflow.com/questions/2924440/advice-on-mocking-system-calls

this system call. What's the recommended method for mocking system calls like this I'm using Boost.Test for my unit testing... I'm using Boost.Test for my unit testing. c unit testing mocking share improve this question In this case you don't need.. improve this question In this case you don't need to mock getaddrinfo rather you need to test without relying on its functionality...

static methods and unit tests

http://stackoverflow.com/questions/4220852/static-methods-and-unit-tests

be avoided when using TDD because they tend to be hard to mock. I find though that the easiest thing to unit test is a static.. it depends on. With a non static method you can use a stub mock fake instance to ease testing but if the code you're testing..

Debugging Best Practices for C++ STL/Boost with gdb

http://stackoverflow.com/questions/432567/debugging-best-practices-for-c-stl-boost-with-gdb

on this makes plugging them into test shims proxies mock objects etc easier that and the fact that exposure to boost's..

How to Google Mock a method called from a struct

http://stackoverflow.com/questions/5921670/how-to-google-mock-a-method-called-from-a-struct

tried with #ifdef and it seems to work. Then I decided to mock it in the #ifdef section but it does nothing. #ifdef UNIT_TEST.. to do it Please any help would be much appreciate it. c mocking googlemock share improve this question You did it wrongly... any help would be much appreciate it. c mocking googlemock share improve this question You did it wrongly. This is..

What modern C++ libraries should be in my toolbox? [closed]

http://stackoverflow.com/questions/777764/what-modern-c-libraries-should-be-in-my-toolbox

log4cxx Pantheios Mocking Google Mock Hippo Mocks Turtle C mock object library for Boost Multimedia Cinder SDL Networking ACE..

Getting Started on Driver Development

http://stackoverflow.com/questions/876155/getting-started-on-driver-development

code included with the DDK. When I wanted to write a mock serial port driver for example I found the sample serial driver..

Why is GoogleMock leaking my shared_ptr?

http://stackoverflow.com/questions/10286514/why-is-googlemock-leaking-my-shared-ptr

is GoogleMock leaking my shared_ptr I use GoogleMock GoogleTest for testing.. is GoogleMock leaking my shared_ptr I use GoogleMock GoogleTest for testing and I'm seeing some strange behavior.. ~MyParameter virtual void myMethod 0 struct MyParameterMock public MyParameter MOCK_METHOD0 myMethod void struct MyClass..

Comparison of arrays in google test?

http://stackoverflow.com/questions/1460703/comparison-of-arrays-in-google-test

this question I would really suggest looking at Google C Mocking Framework . Even if you don't want to mock anything it allows.. container from STL but with custom containers also. Google Mock claims to be almost as portable as Google Test and frankly I..

C++ Unit Testing Libraries

http://stackoverflow.com/questions/2038705/c-unit-testing-libraries

company we use Google Test along with its partner Google Mock for unit testing and object mocking. I find them both combined..

Convenient method in GoogleTest for a double comparison of not equal?

http://stackoverflow.com/questions/3515293/convenient-method-in-googletest-for-a-double-comparison-of-not-equal

You can use the companion mocking framework Google Mock. It has a powerful library of matchers a la Hamcrest which you..

Are there any good C++ Mock object frameworks?

http://stackoverflow.com/questions/38493/are-there-any-good-c-mock-object-frameworks

there any good C Mock object frameworks Does anyone have any experience with Mock.. object frameworks Does anyone have any experience with Mock Object frameworks in C I haven't been able to find much. It.. interested to hear of others. Just an update the Google's gMock has been out for a while now. c unit testing testing mocking..

Test Driven Development with C++

http://stackoverflow.com/questions/5307627/test-driven-development-with-c

share improve this question I can recommend Google Mock . It comes with a copy of Google Test bundled. We switched from.. bundled. We switched from UnitTest too Google Test Google Mock a couple of years ago and have never looked back. Google Mock.. a couple of years ago and have never looked back. Google Mock can be used even if you don't want to use the mocking facilities...

How to Google Mock a method called from a struct

http://stackoverflow.com/questions/5921670/how-to-google-mock-a-method-called-from-a-struct

to Google Mock a method called from a struct Let's have this example Class.. file A a struct B int res a.Get I would need to Google Mock Get method however I will also need to call the real one. I..

What modern C++ libraries should be in my toolbox? [closed]

http://stackoverflow.com/questions/777764/what-modern-c-libraries-should-be-in-my-toolbox

FreeImage OpenCV Logging Boost.Log log4cxx Pantheios Mocking Google Mock Hippo Mocks Turtle C mock object library for.. OpenCV Logging Boost.Log log4cxx Pantheios Mocking Google Mock Hippo Mocks Turtle C mock object library for Boost Multimedia.. Boost.Log log4cxx Pantheios Mocking Google Mock Hippo Mocks Turtle C mock object library for Boost Multimedia Cinder SDL..