JD2022-TU1/main/extern/gear4/gear_testing/gear_testing.h

34 lines
1.5 KiB
C++

#ifndef GEAR_TESTING__GEAR_TESTING_H_
#define GEAR_TESTING__GEAR_TESTING_H_
// Under the Microsoft compilers, macros named min and max exist conflicting with our
// templated min and max algorithm and giving us a very weird error message. The fix is just to define
// NOMINMAX preventing those macro to be defined.
#if defined(_XBOX_VER) || defined(WIN32) || defined(_WIN64) || defined(WIN64) || defined(_DURANGO) || defined(_XBOX_ONE)
# if !defined( NOMINMAX )
# define NOMINMAX
# endif
#endif
#include <gear_core/base/platform.h>
// MS Compilers have a buggy version of tuple
// Specifically, the MS version of std::make_tuple takes parameters by value (temporary copy) instead of by reference.
// This is very bad for types that greater-than-default alignment requirements (eg. SIMD matrices), as it forces a copy to be created on the stack, with no guarantee of correct alignment
#if G4_PLATFORM_MS && !defined( GTEST_USE_OWN_TR1_TUPLE )
# if (_MSC_VER < 1700) // GTest tuple conflicts with some VC11 headers (specifically, <utility>)
# define GTEST_USE_OWN_TR1_TUPLE 1
# else
# define GTEST_USE_OWN_TR1_TUPLE 0
# endif
#endif
#include <gear_testing/core/stddef.h> // Must be included before all containers' header files because of G4_TEST_EAL_ID.
#include <gear_testing/core/core.h>
#include <gear_testing/math/math.h>
#include <gear_testing/metrics/metrics.h>
#include <gear_testing/environment/ealtestenv.h>
#include <gear_testing/generator/generator.h>
#endif