恢复test_main.cpp

This commit is contained in:
xiaoniu 2023-10-18 13:59:44 +08:00
parent c4e8cb80d5
commit e20b066135

View File

@ -56,6 +56,12 @@ void init_hikyuu_test() {
}
int main(int argc, char** argv) {
#if defined(_WIN32)
// Windows 下设置控制台程序输出代码页为 UTF8
auto old_cp = GetConsoleOutputCP();
SetConsoleOutputCP(CP_UTF8);
#endif
doctest::Context context;
// !!! THIS IS JUST AN EXAMPLE SHOWING HOW DEFAULTS/OVERRIDES ARE SET !!!
@ -71,11 +77,6 @@ int main(int argc, char** argv) {
// overrides
context.setOption("no-breaks", true); // don't break in the debugger when assertions fail
#if defined(_WIN32)
// Windows 下设置控制台程序输出代码页为 UTF8
auto old_cp = GetConsoleOutputCP();
SetConsoleOutputCP(CP_UTF8);
#endif
init_hikyuu_test();
int res = 0;