[wallet] tests: Don't use floating point #8215

pull MarcoFalke wants to merge 1 commits into bitcoin:master from MarcoFalke:Mf1606-walletTestFloat changing 1 files +25 −21
  1. MarcoFalke commented at 11:33 AM on June 17, 2016: member

    Currently we rely on the compiler to properly handle floating points. However, doing "some refactoring" triggers the floating point behavior to be unpredictable on different archs/compilers and the tests will fail. (e.g. 32 bit test binaries produced by the gnu compiler will fail)

    It is trivial to get rid of that, so let's do it.

  2. [wallet] tests: Don't use floating point faa91b12f7
  3. MarcoFalke added the label Tests on Jun 17, 2016
  4. in src/wallet/test/wallet_tests.cpp:None in faa91b12f7
      26 | @@ -27,7 +27,7 @@ typedef set<pair<const CWalletTx*,unsigned int> > CoinSet;
      27 |  
      28 |  BOOST_FIXTURE_TEST_SUITE(wallet_tests, WalletTestingSetup)
      29 |  
      30 | -static CWallet wallet;
      31 | +static const CWallet wallet;
    


    laanwj commented at 11:54 AM on June 17, 2016:

    Aside: We create a global static wallet object here? I never knew, assumed these tests would use the wallet created in WalletTestingSetup.

  5. MarcoFalke merged this on Jun 18, 2016
  6. MarcoFalke closed this on Jun 18, 2016

  7. MarcoFalke referenced this in commit a072d1a837 on Jun 18, 2016
  8. MarcoFalke deleted the branch on Jun 18, 2016
  9. codablock referenced this in commit 12d054bfe0 on Sep 16, 2017
  10. codablock referenced this in commit b38ef8b296 on Sep 19, 2017
  11. codablock referenced this in commit 7f9130e75d on Dec 27, 2017
  12. codablock referenced this in commit 46473757ee on Dec 28, 2017
  13. andvgal referenced this in commit fb0a5c129e on Jan 6, 2019
  14. DrahtBot locked this on Sep 8, 2021
Labels

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-17 06:15 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me