-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcore.cpp
More file actions
40 lines (31 loc) · 1.13 KB
/
core.cpp
File metadata and controls
40 lines (31 loc) · 1.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#include <q-tee/common/common.h>
#ifdef Q_OS_WINDOWS
#define _CRT_SECURE_NO_WARNINGS
#ifndef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN
#endif
#include <windows.h>
#endif
// used: [stl] ofstream
#include <fstream>
#include "tests/dtoa.h"
#include "tests/atod.h"
#include "tests/itoa.h"
#include "tests/ttoa.h"
int main()
{
#ifdef Q_OS_WINDOWS
const HANDLE hOutput = ::GetStdHandle(STD_OUTPUT_HANDLE);
if (hOutput == INVALID_HANDLE_VALUE)
return EXIT_FAILURE;
// enable virtual terminal to support ANSI escape-codes
if (DWORD dwConsoleMode = 0UL; !::GetConsoleMode(hOutput, &dwConsoleMode) || !::SetConsoleMode(hOutput, dwConsoleMode | ENABLE_VIRTUAL_TERMINAL_PROCESSING))
return EXIT_FAILURE;
::SetConsoleOutputCP(CP_UTF8);
#endif
BENCH::ATOD::Test("results/atod/" Q_BENCH_BUILD "_" Q_BENCH_COMPILER "_" Q_BENCH_OS ".csv");
BENCH::DTOA::Test("results/dtoa/" Q_BENCH_BUILD "_" Q_BENCH_COMPILER "_" Q_BENCH_OS ".csv");
BENCH::ITOA::Test("results/itoa/" Q_BENCH_BUILD "_" Q_BENCH_COMPILER "_" Q_BENCH_OS ".csv");
BENCH::TTOA::Test("results/ttoa/" Q_BENCH_BUILD "_" Q_BENCH_COMPILER "_" Q_BENCH_OS ".csv");
return EXIT_SUCCESS;
}