The most recent content from our members.
I have something like this in my header file which is included to project. extern struct{ uint32_t a; uint16_t b; } ex_var; ex_var is used in the functions which I am trying to test. When I am trying to run unit tests using Built In configuration I receive: undefined reference to `ex_var' In stub view I can find this…
Using: Eclipse with parasoft plugin. I am using Data source as input for my test suite (test cases), while adding data source to test suite level a .properties file gets generated. Issue I am facing is: to generated Test Suite I am using a external folder which was initially not inside the project scope, I have added the…
I had a project with some tests for embedded product. As we are on active development we have usually update our source files in C/C++ test. If the is any tutorial how to update sources I will be very pleased. After this update, I deleted my old generated stubs for this project as they were deprecated. When I tried to…
I had created a stub to test function B. The original function of the stub was used to test function A in the past. Now with this newly created stub, the test case made for function A has broken due to the original function no longer being called, despite not registering for the stub callback. Can someone explain why it is…
I have a file with several undefined reference errors (the function definitions of these functions are within another file which is not part of my current module). To resolve these I generated auto stubs and rebuilt my project again. But the undefined reference errors are not going away. How do I resolve this? Thank you
I've made a couple of stubs using the "Lesson 15: Configuring Stub Behavior in Source Code" chapter in "C++test Host-Based Unit Testing" guide. After running "Collect Stub Information" I created User Stubs for the functions I needed to stub. Trying to execute my test case give the error: function…
Recently I had to stub out a Linux ioctl function for testing. I found that the stub doesn't pass the variadic arguments to the callback function. In order to pass the arguments I made a quick hack, and hijacked the __return pointer from within the auto-generated stub code to be able to see the arguments as shown below. Is…
My code under test calls another function, I'll call function A. Function A lives in a linked in static library called SL. Function A inside SL calls Function B directly which also lives in SL. I want to stub the call to function B. In this configuration, is this possible? In more general terms, can I stub an internal…
In my project I've a stub of a fread -function (ANSI C file raed). CppTest_Stub_fread (void * _MT_var52, size_t _MT_var53, size_t _MT_var54, FILE * _MT_var55); //stub declaration How to set the out put paramer _MT_var52 from the testcase body? CPPTEST_ON_CALL("foo")->Arg("__return").Assign()->Int(5);…
It looks like you're new here. Sign in or register to get started.