-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move some global variables from main.cpp to TestGlobals.cpp
- Loading branch information
Showing
3 changed files
with
81 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
/* | ||
* 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; |