🛰️航天仿真算法库 SpaceAST 0.3.1
载入中...
搜索中...
未找到
AstTestMacro.h
浏览该文件的文档.
1
20
21#pragma once
22
23#include "AstGlobal.h"
24#include <cmath> // for fabs
25#include <cstdio> // for printf
26#include <iostream> // for std::cout
27#include "AstTest/TestConfig.hpp" // for test config
28#include "AstUtil/Environment.hpp" // for env check
29#ifdef AST_WITH_GTEST
30#include <gtest/gtest.h>
31#else
32#include "AstTest/TestFramework.hpp" // 内置的 gtest 兼容测试框架
33#endif
34
35#define GTEST_MAIN() \
36int main(int argc, char **argv) { \
37 std::printf("Running main() from %s\n", __FILE__); \
38 testing::InitGoogleTest(&argc, argv); \
39 return RUN_ALL_TESTS(); \
40}
41
42#ifndef GTEST_SKIP
43# define GTEST_SKIP() return GTEST_SUCCESS_("Test skipped") // 兼容老版本gtest
44#endif
45
46