googletest Questions
2
Solved
I'm programming some unit test with the Google test framework. But I want to check whether some asserts are well placed and are useful. Is there a way to catch an assert in Google test?
Example co...
Marras asked 21/9, 2010 at 0:2
2
Solved
The question is about google-test framework.
I want to run all tests excluding some according to multiple exclusion filters, like:
--gtest_filter=-ABC.*:-BCD.*
Jessiejessika asked 24/12, 2012 at 7:29
2
Solved
I'm trying to add googletest to my build using the FetchContent module, but I've come across many partial answers and have been unable to get where I want. There seems to be an excess of dated exam...
Pension asked 3/11, 2019 at 6:10
1
Solved
First, some background info about elf32-x86-64 format.
It is a format that leverages 64-bit hardware while enforcing 32-bit pointers. Ref1 and Ref2.
Question
I am trying to link the Google Test ...
Immortality asked 1/11, 2019 at 4:57
6
Solved
I just downloaded googletest, generated its makefile with CMake and built it. Now, I need to use it in my testing project.
With CMake, I have been advised not pointing to gtest libraries directly ...
Hairball asked 13/3, 2012 at 17:40
2
Solved
I have a git repository with some test code in C++ and I want to use Googletest to write some tests. I used git submodule to get it as part of the above repository. I want to use meson as the build...
Firstborn asked 13/8, 2019 at 7:52
7
Solved
Is it possible to capture the stdout and stderr when using the googletest framework?
For example, I would like to call a function that writes errors to the console (stderr).
Now, when calling the ...
Latea asked 27/9, 2010 at 11:46
2
Solved
The constructor of my class is
A( ...
std::function<bool(const std::string&, const std::string&)> aCallBack,
... );
I want to use EXPECT_CALL to test it. This callback is from a...
Vickyvico asked 1/3, 2017 at 0:18
4
Solved
I am unable to understand why the test case failed in case of summing double numbers or floats. It works very finely for the integer data type.
//the method in simple_method.h
double sum ( double...
Nazario asked 28/2, 2013 at 5:59
3
Solved
In all the documentation about gmock I always find the mock object to be instantiated inside a test, like that:
TEST(Bim, Bam)
{
MyMockClass myMockObj;
EXPECT_CALL(MyMockObj, foo(_));
...
}
S...
Sewer asked 28/8, 2015 at 8:29
3
I'm trying to setup google testing framework for my c++ project following this guide in xcode 7.0 I got to the last step Build and Go but after hours of searching online I can't get my test project...
Pediform asked 26/9, 2015 at 12:9
2
Solved
I am trying to test a http client using gtest. I want to test this client with my own http server. I have a small python server. Test cases would be client sending various requests to this python s...
Mcelroy asked 18/6, 2019 at 23:3
3
How do I know which version of Gtest is being used in the project I'm working with? I'm working on a linux platform.
Sunderance asked 4/2, 2013 at 12:58
3
Solved
I installed the Microsoft.googletest.v140.windesktop.msvcstl.static.rt-dyn package into my VS 2017 application solution. This was accomplished by adding a new GoogleTest project to my solution via ...
Approximation asked 26/4, 2018 at 23:11
2
Solved
I am trying to use GMock (google mocking framework for c++) for the first time. I have the following class:
class LocalCache
{
public:
virtual time_t GetCurrentTime() = 0;
virtual int AddEntry(c...
Eleen asked 12/9, 2015 at 1:40
3
I'm using GoogleTest version 1.7.0 to test my C++ application. I have an enum defined as following
namespace MyNamespace {
enum class MyEnum {
MyEnumValue,
MyEnumValue2
}
}
GoogleTest incorrec...
Lawrence asked 5/2, 2015 at 14:12
2
Solved
I have a Parser that has to be tested. There are lots of test input files to this Parser. The expected behaviour of the Parser is tested by comparing output of the Parser with corresponding pregene...
Millrace asked 3/10, 2013 at 13:16
4
Solved
I'm trying to understand the purpose of google-mock, Google's C++ mocking framework.
I have already worked with gtest earlier, but still I can't understand what gmock is. Why do we need it?
gtest...
Lollar asked 4/12, 2012 at 5:1
7
Solved
I'm trying to build gtest on Visual Studio 2010. After converting the solution file, I tried to build, and I got the following warning messages.
Warning 1 warning MSB8012:
TargetPath(C:\Users\suc...
Serdab asked 10/1, 2011 at 20:8
3
Solved
I'm using gmock to mock my dependencies in legacy code. One of the class have a method with 11 parameters. When I tried to use MOCK_METHOD11_WITH_CALLTYPE to mock it, I found this macro doesn't exi...
Blithering asked 21/3, 2013 at 3:53
3
everyone.
In my specific Clion project, I have several cpp Unit Tests files (google tests), each of them with its main. I'm searching a way to run all unit tests of the project in a easy way. In t...
Carmella asked 4/4, 2016 at 23:53
3
Solved
I have a suite of unit tests that is managed by googletest. These tests are run in multiple threads by default, even when I use --gtest_filter=foo.test so that it only runs a single test. This is c...
Levine asked 29/3, 2015 at 22:4
2
Solved
A Google search yields the GitHub page for Google Test. I'm finding many links around the web to https://github.com/google/googletest, which now redirects to the GitHub page. The GitHub project has...
Brigitta asked 17/12, 2015 at 10:31
3
Solved
It seems like there are a few answers that kind-of, sort-of make sense, but that I don't know how to carry out. And I haven't found a comprehensive answer.
The First Problem
Google Test should no...
Jerold asked 14/3, 2016 at 21:56
1
Solved
I'm having trouble integrating googletest into my existing project. I put together a simple project to represent my project's structure:
Project Structure
CMakeLists.txt:
cmake_minimum_require...
Nevski asked 12/2, 2019 at 16:59
© 2022 - 2024 — McMap. All rights reserved.