test.h
Go to the documentation of this file.
00001 /** 00002 * @file test.h 00003 * @brief Main include file of C++ unit testing framework. 00004 * 00005 * This file should be included by implementations of unit tests. 00006 * Note that currently we are simply using Google Test and Google Mock. 00007 * Likely, this will not change soon. However, we use this header file 00008 * to be prepared for this case. The implementation of the functions 00009 * and macros provided by the underlying testing frameworks could then 00010 * potentially be replaced by another implementations if desired. 00011 * 00012 * Copyright (c) 2011 University of Pennsylvania. All rights reserved.<br /> 00013 * See https://www.cbica.upenn.edu/sbia/software/license.html or COPYING file. 00014 * 00015 * Contact: SBIA Group <sbia-software at uphs.upenn.edu> 00016 * 00017 * @ingroup CxxTesting 00018 */ 00019 00020 #pragma once 00021 #ifndef _BASIS_TEST_H 00022 #define _BASIS_TEST_H 00023 00024 00025 #include <basis/config.h> 00026 00027 00028 // let Google use their own tr1/tuple implementation if the compiler 00029 // does not support it; note that HAVE_TR1_TUPLE is set in config.h 00030 #ifdef GTEST_USE_OWN_TR1_TUPLE 00031 # undef GTEST_USE_OWN_TR1_TUPLE 00032 #endif 00033 #if HAVE_TR1_TUPLE 00034 # define GTEST_USE_OWN_TR1_TUPLE 0 00035 #else 00036 # define GTEST_USE_OWN_TR1_TUPLE 1 00037 #endif 00038 00039 // disable use of pthreads library if not available 00040 #ifdef GTEST_HAS_PTHREAD 00041 # undef GTEST_HAS_PTHREAD 00042 #endif 00043 #if HAVE_PTHREAD 00044 # define GTEST_HAS_PTHREAD 1 00045 #else 00046 # define GTEST_HAS_PTHREAD 0 00047 #endif 00048 00049 00050 #include <basis/gtest/gtest.h> 00051 #include <basis/gmock/gmock.h> 00052 00053 00054 #endif // _BASIS_TEST_H