-
as seen on Stack Overflow
- Search for 'Stack Overflow'
I am trying to add my first unit test to an existing Open Source project. Specifically, I added a new class, called audio_manager:
src/audio/audio_manager.h
src/audio/audio_manager.cc
I created a src/test directory structure that mirrors the structure of the implementation files, and wrote my googletest…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
I have a bunch of module tests written in CPPunit with some mocks created by hand. I am looking for a way to migrate them to GoogleTest as smoothly as possible.
Have you tried such an operation?
What was the effort needed?
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
I have a class that has no default constructor, but the construct may throw.
I was wanting to have a test like:
EXPECT_THROW(MyClass(param), std::runtime_error);
But the compiler, g++, complains that there is no default constructor for Myclass.
However the following:
EXPECT_THROW(MyClass foo(param)…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
While ASSERT_* macros cause termination of test case, EXPECT_* macros continue its evaluation.
I would like to know which is the criteria to decide whether to use one or the other.
>>> More
-
as seen on Super User
- Search for 'Super User'
I am trying to follow the instructions mentioned here for setting up Google's C++ framework in XCode Version 4.5.2 (4G2008a).
First, I got "The run destination My Mac 64-bit is not valid for Running the scheme 'gtest-framework'". The answers here Xcode 4 - The selected run destination is not valid…
>>> More