VTK
9.7.20261011
Main Page
Related Pages
Topics
Namespaces
Classes
Files
File List
File Members
Views
Scivis
Testing
Cxx
ScivisTestUtilities.h
Go to the documentation of this file.
1
// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2
// SPDX-License-Identifier: BSD-3-Clause
3
#ifndef ScivisTestUtilities_h
4
#define ScivisTestUtilities_h
5
6
#include <cstdlib>
7
#include <iostream>
8
9
// Fail the enclosing test function, printing msg, when expr is false. msg may
10
// be a chain of stream insertions, as in CHECK(n == 3, "got " << n << " bars").
11
#define CHECK(expr, msg) \
12
do \
13
{ \
14
if (!(expr)) \
15
{ \
16
std::cerr << "FAILED: " << msg << "\n"; \
17
return EXIT_FAILURE; \
18
} \
19
} while (false)
20
21
#endif
Generated on
for VTK by
1.16.1