IMP  2.4.0
The Integrative Modeling Platform
Macros
test_macros.h File Reference
#include <IMP/base/log_macros.h>
+ Include dependency graph for test_macros.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define IMP_TEST_EQUAL(a, b)
 Report an error if a != b. More...
 
#define IMP_TEST_GREATER_THAN(a, b)
 Report an error if a < b. More...
 
#define IMP_TEST_LESS_THAN(a, b)
 Report an error if a >= b. More...
 
#define IMP_TEST_TRUE(a)
 Report an error if !a. More...
 

Detailed Description

Macros for writing C++ tests.

Copyright 2007-2015 IMP Inventors. All rights reserved.

Definition in file test_macros.h.

Macro Definition Documentation

#define IMP_TEST_EQUAL (   a,
 
)

Report an error if a != b.

Definition at line 14 of file test_macros.h.

#define IMP_TEST_GREATER_THAN (   a,
 
)

Report an error if a < b.

Definition at line 34 of file test_macros.h.

#define IMP_TEST_LESS_THAN (   a,
 
)

Report an error if a >= b.

Definition at line 27 of file test_macros.h.

#define IMP_TEST_TRUE (   a)
Value:
if (!(a)) { \
IMP_ERROR("Test failed: !" << #a); \
}
#define IMP_ERROR(expr)
Write a warning to standard error.
Definition: log_macros.h:72

Report an error if !a.

Definition at line 21 of file test_macros.h.