CTK 0.1.0
The Common Toolkit is a community effort to provide support code for medical image analysis, surgical navigation, and related projects.
ctkCoreTestingUtilities.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Library: CTK
4
5 Copyright (c) Kitware Inc.
6
7 Licensed under the Apache License, Version 2.0 (the "License");
8 you may not use this file except in compliance with the License.
9 You may obtain a copy of the License at
10
11 http://www.apache.org/licenses/LICENSE-2.0.txt
12
13 Unless required by applicable law or agreed to in writing, software
14 distributed under the License is distributed on an "AS IS" BASIS,
15 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 See the License for the specific language governing permissions and
17 limitations under the License.
18
19=========================================================================*/
20
21#ifndef __ctkCoreTestingUtilities_h
22#define __ctkCoreTestingUtilities_h
23
24// CTK includes
25#include <ctkCoreExport.h>
26
27// Qt includes
28#include <QString>
29#include <QStringList>
30#include <QVariant>
31
50
52{
53
54CTK_CORE_EXPORT
55bool CheckInt(int line, const QString& description,
56 int current, int expected);
57
58CTK_CORE_EXPORT
59bool CheckNotNull(int line, const QString& description,
60 const void* pointer);
61
62CTK_CORE_EXPORT
63bool CheckNull(int line, const QString& description,
64 const void* pointer);
65
66CTK_CORE_EXPORT
67bool CheckPointer(int line, const QString& description,
68 void* current, void* expected, bool errorIfDifferent = true);
69
70CTK_CORE_EXPORT
71bool CheckString(int line, const QString& description,
72 const char* current, const char* expected, bool errorIfDifferent = true );
73
74CTK_CORE_EXPORT
75bool CheckStringList(int line, const QString& description,
76 const QStringList& current, const QStringList& expected);
77
78CTK_CORE_EXPORT
79bool CheckVariant(int line, const QString& description,
80 const QVariant& current, const QVariant& expected);
81
82} // namespace ctkCoreTestingUtilities
83
84#include "ctkCoreTestingUtilities.tpp"
85
86#endif
CTK_CORE_EXPORT bool CheckStringList(int line, const QString &description, const QStringList &current, const QStringList &expected)
CTK_CORE_EXPORT bool CheckVariant(int line, const QString &description, const QVariant &current, const QVariant &expected)
CTK_CORE_EXPORT bool CheckNull(int line, const QString &description, const void *pointer)
CTK_CORE_EXPORT bool CheckPointer(int line, const QString &description, void *current, void *expected, bool errorIfDifferent=true)
CTK_CORE_EXPORT bool CheckNotNull(int line, const QString &description, const void *pointer)
CTK_CORE_EXPORT bool CheckString(int line, const QString &description, const char *current, const char *expected, bool errorIfDifferent=true)
CTK_CORE_EXPORT bool CheckInt(int line, const QString &description, int current, int expected)