QMCPACK
test_rng.cpp
Go to the documentation of this file.
1 //////////////////////////////////////////////////////////////////////////////////////
2 // This file is distributed under the University of Illinois/NCSA Open Source License.
3 // See LICENSE file in top directory for details.
4 //
5 // Copyright (c) 2022 QMCPACK developers.
6 //
7 // File developed by: Mark Dewing, markdewing@gmail.com, University of Illinois at Urbana-Champaign
8 //
9 // File created by: Mark Dewing, markdewing@gmail.com, University of Illinois at Urbana-Champaign
10 //////////////////////////////////////////////////////////////////////////////////////
11 
12 
13 #include "catch.hpp"
14 
16 #include <stdio.h>
17 #include <string>
18 #include <vector>
19 
20 using std::string;
21 using std::vector;
22 namespace qmcplusplus
23 {
24 TEST_CASE("make_seed", "[utilities]")
25 {
26  // not sure what to test here - mostly that it doesn't crash
27  // It's based on 'time' so it will return different values at different calls
28  // If the time is the same (1 second resolution), different inputs should
29  // give different seeds.
30  unsigned int seed1 = make_seed(0, 0);
31  unsigned int seed2 = make_seed(1, 1);
32 
33  REQUIRE(seed1 != seed2);
34 }
35 
36 } // namespace qmcplusplus
helper functions for EinsplineSetBuilder
Definition: Configuration.h:43
TEST_CASE("complex_helper", "[type_traits]")
REQUIRE(std::filesystem::exists(filename))
uint32_t make_seed(int i, int n)
Declare a global Random Number Generator.