LCOV - code coverage report
Current view: top level - src/qt/test - compattests.cpp (source / functions) Hit Total Coverage
Test: total_coverage.info Lines: 5 5 100.0 %
Date: 2020-09-26 01:30:44 Functions: 1 1 100.0 %

          Line data    Source code
       1             : // Copyright (c) 2016-2019 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             : #if defined(HAVE_CONFIG_H)
       6             : #include <config/bitcoin-config.h>
       7             : #endif
       8             : 
       9             : #include <qt/test/compattests.h>
      10             : 
      11             : #include <compat/byteswap.h>
      12             : 
      13           1 : void CompatTests::bswapTests()
      14             : {
      15             :         // Sibling in bitcoin/src/test/bswap_tests.cpp
      16             :         uint16_t u1 = 0x1234;
      17             :         uint32_t u2 = 0x56789abc;
      18             :         uint64_t u3 = 0xdef0123456789abc;
      19             :         uint16_t e1 = 0x3412;
      20             :         uint32_t e2 = 0xbc9a7856;
      21             :         uint64_t e3 = 0xbc9a78563412f0de;
      22           1 :         QVERIFY(bswap_16(u1) == e1);
      23           1 :         QVERIFY(bswap_32(u2) == e2);
      24           1 :         QVERIFY(bswap_64(u3) == e3);
      25           1 : }

Generated by: LCOV version 1.15