Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
mitkTinyXMLTest.cpp File Reference
#include "mitkTestingMacros.h"
#include <mitkNumericTypes.h>
#include <cmath>
#include <iomanip>
#include <string>
#include <tinyxml.h>
#include <itksys/SystemTools.hxx>

Go to the source code of this file.

Functions

static double calcPrecision (const unsigned int requiredDecimalPlaces)
 
static bool Setup (double valueToWrite)
 
static int readValueFromSetupDocument (double &readOutValue)
 
static bool TearDown ()
 
static void Test_Setup_works ()
 
static void Test_ReadOutValue_works ()
 
static void Test_DoubleValueWriteOut ()
 
static void Test_DoubleValueWriteOut_manyDecimalPlaces ()
 
int mitkTinyXMLTest (int, char *[])
 

Variables

static const std::string filename
 
static const std::string elementToStoreAttributeName
 
static const std::string attributeToStoreName
 

Function Documentation

static double calcPrecision ( const unsigned int  requiredDecimalPlaces)
static
static int readValueFromSetupDocument ( double &  readOutValue)
static
static bool Setup ( double  valueToWrite)
static

create a simple xml document which stores the values

Parameters
valueToWritevalue which should be stored
Returns
true, if document was successfully created.

Definition at line 42 of file mitkTinyXMLTest.cpp.

References attributeToStoreName, elementToStoreAttributeName, and filename.

Referenced by Test_DoubleValueWriteOut(), Test_DoubleValueWriteOut_manyDecimalPlaces(), Test_ReadOutValue_works(), and Test_Setup_works().

static bool TearDown ( )
static
Returns
true if TearDown was successful.

Definition at line 84 of file mitkTinyXMLTest.cpp.

References filename.

Referenced by Test_DoubleValueWriteOut(), Test_DoubleValueWriteOut_manyDecimalPlaces(), and Test_Setup_works().

static void Test_DoubleValueWriteOut ( )
static
static void Test_DoubleValueWriteOut_manyDecimalPlaces ( )
static
static void Test_ReadOutValue_works ( )
static

this first test ensures we can correctly readout values from the TinyXMLDocument.

Definition at line 100 of file mitkTinyXMLTest.cpp.

References MITK_TEST_CONDITION_REQUIRED, readValueFromSetupDocument(), and Setup().

Referenced by mitkTinyXMLTest().

static void Test_Setup_works ( )
static

Definition at line 89 of file mitkTinyXMLTest.cpp.

References filename, MITK_TEST_CONDITION_REQUIRED, Setup(), and TearDown().

Referenced by mitkTinyXMLTest().

Variable Documentation

const std::string attributeToStoreName
static

Definition at line 30 of file mitkTinyXMLTest.cpp.

Referenced by readValueFromSetupDocument(), and Setup().

const std::string elementToStoreAttributeName
static

Definition at line 29 of file mitkTinyXMLTest.cpp.

Referenced by readValueFromSetupDocument(), and Setup().

const std::string filename
static

Definition at line 28 of file mitkTinyXMLTest.cpp.

Referenced by mitk::ITKDICOMSeriesReaderHelper::CanHandleFile(), TrackVisFiberReader::create(), CreateFileList(), vtkXMLMaterial::CreateInstance(), mitk::EndoDebug::DebugFile(), mitk::EventConfig::EventConfig(), mitk::CameraIntrinsics::FromXML(), mitk::XMLSerializable::FromXMLFile(), mitk::TrackingVolumeGenerator::GenerateData(), mitk::ImageWriter::GenerateData(), mitk::FileSeriesReader::GenerateFileList(), ModuleContext::GetDataFile(), mitk::CustomMimeType::GetExtension(), mitk::CustomMimeType::GetFilenameWithoutExtension(), mitk::EndoDebug::GetUniqueFileName(), ImageVtkDataReferenceCheck(), mitk::SceneReaderV1::LoadBaseDataFromDataTag(), mitk::ClaronTool::LoadFile(), mitk::VtkShaderRepository::LoadShaders(), mitk::NDIPassiveTool::LoadSROMFile(), mitk::EventStateMachine::LoadStateMachine(), mitk::VtkModel::loadTextures(), QmitkIGTConnectionWidget::LoadToolfile(), vtkXMLShader::LocateFile(), main(), mitk::CustomMimeType::MatchesExtension(), mitkDICOMLocaleTest(), mitkExtractSliceFilterTest(), mitkImageTest(), mitkRotatedSlice4DTest(), mitkVolumeCalculatorTest(), QmitkPointListWidget::OnBtnLoadPoints(), QmitkNavigationToolManagementWidget::OnLoadStorage(), QmitkNavigationToolCreationWidget::OnLoadSurface(), QmitkNavigationToolManagementWidget::OnLoadTool(), QmitkNDIConfigurationWidget::OnLoadTool(), QmitkIGTPlayerWidget::OnOpenFileButtonPressed(), QmitkNavigationToolManagementWidget::OnSaveStorage(), QmitkNavigationToolManagementWidget::OnSaveTool(), QmitkNDIConfigurationWidget::OnSaveTool(), QmitkFileChooser::OnSelectFileClicked(), QmitkNDIConfigurationWidget::OnTableItemClicked(), TrackVisFiberReader::open(), mitk::FiberBundleTrackVisReader::Read(), mitk::PlanarFigureCompositeReader::Read(), mitk::FiberBundleVtkReader::Read(), mitk::DiffusionHeaderSiemensMosaicDICOMFileReader::ReadDiffusionHeader(), mitk::DiffusionHeaderSiemensDICOMFileReader::ReadDiffusionHeader(), readValueFromSetupDocument(), mitk::SceneIO::SaveScene(), mitk::StandardFileLocations::SearchDirectoriesForFile(), QmitkBSplineRegistrationView::SelectDeformationField(), mitk::ContourModelSetSerializer::Serialize(), mitk::VigraRandomForestClassifierSerializer::Serialize(), mitk::ContourModelSerializer::Serialize(), mitk::PlanarFigureSerializer::Serialize(), mitk::ExampleDataStructureSerializer::Serialize(), mitk::PointSetSerializer::Serialize(), mitk::SimulationSerializer::Serialize(), mitk::ConnectomicsNetworkSerializer::Serialize(), mitk::LabelSetImageSerializer::Serialize(), mitk::QBallImageSerializer::Serialize(), mitk::SurfaceSerializer::Serialize(), mitk::TensorImageSerializer::Serialize(), mitk::FiberBundleSerializer::Serialize(), mitk::PlanarFigureCompositeSerializer::Serialize(), mitk::ImageSerializer::Serialize(), mitk::GeometryDataSerializer::Serialize(), mitk::MAPRegistrationWrapperSerializer::Serialize(), mitk::NavigationToolStorageSerializer::Serialize(), mitk::PropertyListSerializer::Serialize(), mitk::EquiDistantBlocksSorter::SliceGroupingAnalysisResult::SetFirstFilenameOfBlock(), mitk::EquiDistantBlocksSorter::SliceGroupingAnalysisResult::SetLastFilenameOfBlock(), mitk::ManufacturerLogo::SetLogoSource(), QmitkMicronTrackerWidget::SetMTCalibrationFileClicked(), QmitkNPOptitrackWidget::SetOptitrackCalibrationFileClicked(), mitk::EventRecorder::SetOutputFile(), QmitkIGTLoggerWidget::SetOutputFileName(), Setup(), mitk::OpenCVVideoSource::SetVideoFileInput(), TearDown(), Test_Setup_works(), TestThreadSaveLog(), mitk::TeemDiffusionTensor3DReconstructionImageFilter< DiffusionImagePixelType, TTensorPixelType >::Update(), mitk::PlanarFigureCompositeWriter::Write(), mitk::FiberBundleTrackVisWriter::Write(), mitk::FiberBundleVtkWriter::Write(), and mitk::XML2EventParser::XML2EventParser().