LCOV - code coverage report
Current view: top level - src/test - xoroshiro128plusplus_tests.cpp (source / functions) Hit Total Coverage
Test: fuzz_coverage.info Lines: 0 16 0.0 %
Date: 2023-10-05 12:38:51 Functions: 0 9 0.0 %
Branches: 0 0 -

           Branch data     Line data    Source code
       1                 :            : // Copyright (c) 2022 The Bitcoin Core developers
       2                 :            : // Distributed under the MIT software license, see the accompanying
       3                 :            : // file COPYING or http://www.opensource.org/licenses/mit-license.php.
       4                 :            : 
       5                 :            : #include <test/util/setup_common.h>
       6                 :            : #include <test/util/xoroshiro128plusplus.h>
       7                 :            : 
       8                 :            : #include <boost/test/unit_test.hpp>
       9                 :            : 
      10                 :          0 : BOOST_FIXTURE_TEST_SUITE(xoroshiro128plusplus_tests, BasicTestingSetup)
      11                 :            : 
      12                 :          0 : BOOST_AUTO_TEST_CASE(reference_values)
      13                 :            : {
      14                 :            :     // numbers generated from reference implementation
      15                 :          0 :     XoRoShiRo128PlusPlus rng(0);
      16                 :          0 :     BOOST_TEST(0x6f68e1e7e2646ee1 == rng());
      17                 :          0 :     BOOST_TEST(0xbf971b7f454094ad == rng());
      18                 :          0 :     BOOST_TEST(0x48f2de556f30de38 == rng());
      19                 :          0 :     BOOST_TEST(0x6ea7c59f89bbfc75 == rng());
      20                 :            : 
      21                 :            :     // seed with a random number
      22                 :          0 :     rng = XoRoShiRo128PlusPlus(0x1a26f3fa8546b47a);
      23                 :          0 :     BOOST_TEST(0xc8dc5e08d844ac7d == rng());
      24                 :          0 :     BOOST_TEST(0x5b5f1f6d499dad1b == rng());
      25                 :          0 :     BOOST_TEST(0xbeb0031f93313d6f == rng());
      26                 :          0 :     BOOST_TEST(0xbfbcf4f43a264497 == rng());
      27                 :          0 : }
      28                 :            : 
      29                 :          0 : BOOST_AUTO_TEST_SUITE_END()

Generated by: LCOV version 1.14