Category "googletest"

Object not declared in this scope error in cpp?

I'm getting error SPIGtestMain.cpp:"MockObj not declared in this scope" though I've declared it globally in with extern keyword in SPIGtestMain.cpp file. SPIG

Object not declared in this scope error in cpp?

I'm getting error SPIGtestMain.cpp:"MockObj not declared in this scope" though I've declared it globally in with extern keyword in SPIGtestMain.cpp file. SPIG

How to test if output function recieved is are correct or not using GTEST/GMOCK

I am trying implemnent the GTEST/GMOCK framework for unittesting the C-code. I am using the MSVS 2017. The adaptation is completed. Here, I have the matlab gene

C++ google test fail for multi threads

I am having following C++ code and corresponding unit tests in google test. I am studying book on Modern C++ programming using Test Driven development. Below co

Visual studio 2019 Google test nuget package restore failing

I have this error when I try to open some students' assignments in Visual Studio 2019, stating that nuget can't restore a package. I'm concerned about the direc

Identifier "Return" is undefined in gtest?

SPIGtestMain.cpp #include "gtest/gtest.h" #include "gmock/gmock.h" TEST_F(GivenANewSPI,WhenDemoIsCalled_TheComponentGetsVal) { unsigned char const *Ptr;

cygwin_exception::open_stackdumpfile google test

I have read a few topics about errors: cygwin_exception::open_stackdumpfile: Dumping stack trace to program.exe.stackdump But I can't find something that fits m

boost::asio::io_context::stop segfalt in gtest setup and teardown

Using C++17. I am trying to setup a gtest fixture that will create a fresh io_context to run timers on for each test case. My test segfault about 90% of the tim

Xml Generation from Google test does not show skipped test cases

I am using google test framework for doing unit testing in c++. I have few test cases which i have disabled using DISABLED_ before test name and some tests are

Run each test in a new container

I have google test based test suite. Since the tests manipulate the filesystem and do other things that I don't want to be left behind in case of a test crash,

GoogleTest EXPECT_CALL throws uninteresting call warning and returns 0 calls

I am trying to Mock an external library and test what APIs of the library are being called from my interfaces and I have come across a behavior (first time usin

VectorCast vs GTest for unit tests

I am a newbie at VectorCast. I have developed some unit tests with VectorCast. But I am still not confident with VectorCast(maybe, I am wrong:) ). For unit test

google mock - can I call EXPECT_CALL multiple times on same mock object?

If I call EXPECT_CALL twice on the same mock object in the same TEST_F . . . what happens? Are the expectations appended to the mock object or does the second

Injecting a Mock using registerConstructor

I've successfully set up a Mock for injection via fruit using .replace(get*Component).with(getMock*Component) like so: #include <gmock/gmock.h> #include

gtest - testing template class

I want to test a template class with gtest. I read about TYPED_TESTs in Google Test manual and looked at official example they reference, but still can't wrap m

Disable whole test case in gtest

How can one disable a complete test case in gtest? (all the tests in a test case, not just individual tests) The formatting proposed in the gtest doc is to org