New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from Jun 18, 2016

Conversation

Projects
None yet
3 participants
@MarcoFalke
Member

MarcoFalke commented Jun 17, 2016

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.

@MarcoFalke MarcoFalke added the Tests label Jun 17, 2016

@@ -27,7 +27,7 @@ typedef set<pair<const CWalletTx*,unsigned int> > CoinSet;
BOOST_FIXTURE_TEST_SUITE(wallet_tests, WalletTestingSetup)
static CWallet wallet;
static const CWallet wallet;

This comment has been minimized.

@laanwj

laanwj Jun 17, 2016

Member

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

@laanwj

laanwj Jun 17, 2016

Member

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

@laanwj

This comment has been minimized.

Show comment
Hide comment
@laanwj

laanwj Jun 17, 2016

Member

utACK faa91b1

Member

laanwj commented Jun 17, 2016

utACK faa91b1

@paveljanik

This comment has been minimized.

Show comment
Hide comment
@paveljanik

paveljanik Jun 18, 2016

Contributor

ACK faa91b1

Contributor

paveljanik commented Jun 18, 2016

ACK faa91b1

@MarcoFalke MarcoFalke merged commit faa91b1 into bitcoin:master Jun 18, 2016

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

MarcoFalke added a commit that referenced this pull request Jun 18, 2016

Merge #8215: [wallet] tests: Don't use floating point
faa91b1 [wallet] tests: Don't use floating point (MarcoFalke)

@MarcoFalke MarcoFalke deleted the MarcoFalke:Mf1606-walletTestFloat branch Jun 18, 2016

codablock added a commit to codablock/dash that referenced this pull request Sep 16, 2017

Merge #8215: [wallet] tests: Don't use floating point
faa91b1 [wallet] tests: Don't use floating point (MarcoFalke)

codablock added a commit to codablock/dash that referenced this pull request Sep 19, 2017

Merge #8215: [wallet] tests: Don't use floating point
faa91b1 [wallet] tests: Don't use floating point (MarcoFalke)

codablock added a commit to codablock/dash that referenced this pull request Dec 27, 2017

Merge #8215: [wallet] tests: Don't use floating point
faa91b1 [wallet] tests: Don't use floating point (MarcoFalke)

codablock added a commit to codablock/dash that referenced this pull request Dec 28, 2017

Merge #8215: [wallet] tests: Don't use floating point
faa91b1 [wallet] tests: Don't use floating point (MarcoFalke)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment