Questions tagged [cxxtest]

CxxTest is a unit testing framework for C++

CxxTest is a unit testing framework for C++ that is similar in spirit to JUnit, CppUnit, and xUnit. CxxTest is easy to use because it does not require precompiling a CxxTest testing library, it employs no advanced features of C++ (e.g. RTTI) and it supports a very flexible form of test discovery.

40 questions
0
votes
1 answer

Linking CxxTest in CMake, it says it succeeds but fails to build

I just downloaded version 4.4 of cxxtest and unpacked my zip file into this path: C:/cxxtest-4.4. Now immediately after, without doing any additional step I opened CLion and tried to add CxxTest to my project as it…
Baffo rasta
  • 320
  • 1
  • 4
  • 17
0
votes
2 answers

Testing a qt object using cxxtest framework and valgrind

Is it possible to use cxxunit or any other unit testing framework (excluding QtTestLib) to test qt widgets? If yes, then there are two more questions : How? Since I am running unit tests using valgrind, can this report some errors?
BЈовић
  • 62,405
  • 41
  • 173
  • 273
0
votes
0 answers

Can't compile cxxtest generated cpp file

So I have a visual studio 2015 c++ project with a testsuite.h file like the one in the cxx documentation. I run the cxxtestgen python tool to generate a testsuite.cpp. I put the testsuite.cpp file in another visual studio 2015 c++ empty project. Add…
0
votes
1 answer

How do I make an automake rule in an .mk file that deletes a directory upon cleaning?

I would like to delete a another directory when I run make clean, but I can't figure out how to code it up in the rules. I have tried clean-local: -rm -f del.dir but that didn't work. I also tried CLEANFILES = del.dir but that also didn't…
Grammin
  • 11,808
  • 22
  • 80
  • 138
0
votes
0 answers

Are there differences from Visual Studio build event command line and normal command line?

I build a test project (CxxTest) with Visual Studio and immediately execute it via post-build event. This works and did so for a long time already. Now I have different behaviour in the execution in post-build event compared to manually execute from…
this.myself
  • 2,101
  • 2
  • 22
  • 36
0
votes
1 answer

CMake fails to execute cxxtestgen

I'm trying the following CMake cmakelist.txt file for executing tests for my school project: cmake_minimum_required(VERSION 3.3) project(ex2) set(CMAKE_CXX_COMPILER "/usr/local/Cellar/gcc/5.2.0/bin/g++-5") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}…
Luftzig
  • 523
  • 4
  • 14
0
votes
0 answers

Is there a way to know what proportion of code is covered by test with CXX test?

I am using CXX test to do unit testing in my program. I would like to know if there is a way to know what percentage of the program is covered by tests or have any other metric to see how well the program is covered by tests. I am programming in C++…
Alex
  • 371
  • 1
  • 8
0
votes
1 answer

When I run cxxtest I get an undefined reference error

I'm not sure to understand the undefined reference I am getting. ./cxxtest/cxxtestgen.py -o tests.cpp --error-printer DrawTestSuite.h g++ -I./cxxtest/ -c tests.cpp g++ -o tests tests.o Color.o tests.o: In function…
user299648
  • 2,769
  • 6
  • 34
  • 43
0
votes
1 answer

Visual Studio 2010 CxxTest: Fail build if test fails

I have a solution full of C++ projects. I want to stop building and running the projects once the first project fails (aka bad exit status). In a GNU Makefile I could easily accomplish this. How do I do this in Visual Studio? Run a Program as Part…
Matthew Hoggan
  • 7,402
  • 16
  • 75
  • 140
0
votes
1 answer

Is there a #define _KEYWORD_ for CXXTEST compiler to exclude blocks of code?

I need to temporarily put a main() function in my object to test alternate functionality (beyond a simple unit test), but I keep having to comment out my main() function to run my unit tests. Is there a #define _KEYWORD_ for CxxTest to allow this to…
Zak
  • 12,213
  • 21
  • 59
  • 105
1 2
3