-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTestGlobals.cpp
86 lines (82 loc) · 3.58 KB
/
TestGlobals.cpp
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
/*
* SMHasher3
* Copyright (C) 2021-2022 Frank J. T. Wojcik
*
* This program is free software: you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see
* <https://www.gnu.org/licenses/>.
*
* This file incorporates work covered by the following copyright and
* permission notice:
*
* Copyright (c) 2010-2012 Austin Appleby
* Copyright (c) 2014-2021 Reini Urban
* Copyright (c) 2015 Ivan Kruglov
* Copyright (c) 2015 Paul G
* Copyright (c) 2016 Jason Schulz
* Copyright (c) 2016-2018 Leonid Yuriev
* Copyright (c) 2016 Sokolov Yura aka funny_falcon
* Copyright (c) 2016 Vlad Egorov
* Copyright (c) 2018 Jody Bruchon
* Copyright (c) 2019 Niko Rebenich
* Copyright (c) 2019-2020 Yann Collet
* Copyright (c) 2019-2021 data-man
* Copyright (c) 2019 王一 WangYi
* Copyright (c) 2020 Cris Stringfellow
* Copyright (c) 2020 HashTang
* Copyright (c) 2020 Jim Apple
* Copyright (c) 2020 Thomas Dybdahl Ahle
* Copyright (c) 2020 Tom Kaitchuck
* Copyright (c) 2021 Logan oos Even
*
* Permission is hereby granted, free of charge, to any person
* obtaining a copy of this software and associated documentation
* files (the "Software"), to deal in the Software without
* restriction, including without limitation the rights to use,
* copy, modify, merge, publish, distribute, sublicense, and/or
* sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following
* conditions:
*
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
* OTHER DEALINGS IN THE SOFTWARE.
*/
#include "Platform.h"
#include "Hashinfo.h"
#include "TestGlobals.h"
//-----------------------------------------------------------------------------
// Globally-visible configuration
HashInfo::endianness g_hashEndian = HashInfo::ENDIAN_DEFAULT;
uint64_t g_seed = 0;
//--------
// What each test suite prints upon failure
const char * g_failstr = "*********FAIL*********\n";
//--------
// Overall log2-p-value statistics and test pass/fail counts
uint32_t g_log2pValueCounts[COUNT_MAX_PVALUE + 2];
uint32_t g_testPass, g_testFail;
std::vector<std::pair<const char *, char *>> g_testFailures;
//--------
// A string with 128 spaces, useful for aligning text outputs
const char * g_manyspaces =
" " \
" ";