Carna  Version 3.3.2
Classes
Carna::testing Namespace Reference

This namespace contains the test suite components. More...

Classes

class  BufferedHUVolumeTest
 Unit-tests of the Carna::base::BufferedHUVolume class. More...
 
class  BufferedIntensityVolumeTest
 Unit-tests of the Carna::base::BufferedIntensityVolume class. More...
 
class  BufferedNormalMap3DTest
 Unit-tests of the Carna::base::BufferedNormalMap3D class. More...
 
class  ColorTest
 Unit-tests of the Carna::base::Color class. More...
 
class  CuttingPlanesStageTest
 Module-tests of the Carna::presets::CuttingPlanesStage class. More...
 
class  DRRStageTest
 Module-tests of the Carna::presets::DRRStage class. More...
 
class  DVRStageTest
 Module-tests of the Carna::presets::DVRStage class. More...
 
class  FrameRendererHelperTest
 Module-tests of the Carna::helpers::FrameRendererHelper class. More...
 
class  FrameRendererIntegrationTest
 Integration-tests of the Carna::base::FrameRenderer class. More...
 
struct  HUGZSceneFactory
 Creates Carna::base::HUVolumeUInt16 object from HUGZ-file. More...
 
class  HUVTest
 Unit-tests of the Carna::base::HUV class. More...
 
class  MaskRenderingStageIntegrationTest
 Integration-tests of the Carna::presets::MaskRenderingStage class. More...
 
class  MaskRenderingStageTest
 Module-tests of the Carna::presets::MaskRenderingStage class. More...
 
class  mathTest
 Unit-tests of the Carna::base::math namespace. More...
 
class  MeshColorCodingStageTest
 Module-tests of the Carna::presets::MeshColorCodingStage class. More...
 
class  MIPStageTest
 Module-tests of the Carna::presets::MIPStage class. More...
 
class  OpaqueRenderingStageTest
 Module-tests of the Carna::presets::OpaqueRenderingStage class. More...
 
class  ParallaxStageIntegrationTest
 Integration-tests of the Carna::presets::ParallaxStage class. More...
 
class  PointMarkerHelperTest
 Module-tests of the Carna::helpers::PointMarkerHelper class. More...
 
class  TransparentRenderingStageTest
 Module-tests of the Carna::presets::TransparentRenderingStage class. More...
 
class  VolumeGridHelperTest
 Unit-tests of the Carna::helpers::VolumeGridHelper class template. More...
 
class  VolumeGridTestUInt16
 Module-tests of the Carna::base::VolumeGrid class. More...
 
class  VolumeGridTestUInt8
 Module-tests of the Carna::base::VolumeGrid class. More...
 

Detailed Description

This namespace contains the test suite components.

Test Suite

The test suite is built upon QTestLib. It is integrated into CMake not via CTest but as an executable. All files belonging to the test suite are listed within test/CMakeLists.txt. For each class under test there is a test class, that consists of a pair of header and implementation files. The CMake project is set up to build a single executable for the whole test suite.

When executed, the the test suite returns 0 if and only if all tests pass.

Unit Tests, Module Tests, Integration Tests

Considering test types, the test suite currently differs among unit tests, module tests and integration tests. For each test type there is a dedicated configure.cmake file.

This is where the test cases are specified:

Defining the Test Files

In order to add a new test, simply choose the proper test type and modify the corresponding configure.cmake file.

Each consists of the sections below.

Miscellaneous Files

There are two ways of specifying the test suite's additional files that do not define any test classes. If these files are only required by a certain test type, they should be enlisted within the TESTS_QOBJECT_HEADERS or TESTS_HEADERS variable of the corresponding configure.cmake file, depending on whether they do use the Q_OBJECT macro or not. The other option is to enlist them within the test/CMakeLists.txt file, beneath the same variables. This way they become available to each test type.