I got tired of test_bitcoin not building, so I touched up #363. Also added a transaction test which tests derserialization and duplicate txins.
Unit Test Fixes #442
pull TheBlueMatt wants to merge 9 commits into bitcoin:master from TheBlueMatt:testing changing 13 files +99 −9-
TheBlueMatt commented at 12:18 PM on July 31, 2011: member
-
Add missing includes to key.h 3ad2b70670
-
Add missing include to script.h 3960241eca
-
Add missing includes to net.h 31594b5205
-
Add missing include to serialize.h 8798821a95
-
TheBlueMatt commented at 12:22 PM on July 31, 2011: member
Someone needs to test that this builds on OSX first.
-
abbd9a1a49
Fix testing setup
There were some problems with the existing testing setup: - Makefile rules for test-file compilation used CFLAGS instead of CXXFLAGS in makefile.unix
-
5e100893aa
Add prototype for EvalScript() to script.h
This is needed for the script unit tests.
-
TheBlueMatt commented at 10:58 PM on August 1, 2011: member
Tested on OSX by b4epoche, seems fine
-
sipa commented at 2:55 PM on August 2, 2011: member
On current head it fails with:
test/transaction_tests.cpp(22): error in "RealTransaction": Transaction with duplicate txins should be invalid. *** 1 failure detected in test suite "uint160"
I wonder why it sayd 'test suite "uint160"', the failed test is in "transaction_tests".
-
TheBlueMatt commented at 2:58 PM on August 2, 2011: member
Re: it fails: yes it is supposed to, that is a bug that should be fixed (see #443 for a potential solution). Re: uint160, yea I tried to figure out why, but I cant seem to see why, maybe someone else can figure that out...In any case thats a fairly minor UI issue and isnt a regression.
-
sipa commented at 3:09 PM on August 2, 2011: member
I didn't mean to comment on the failure itself, only on the reporting thereof. It's a minor issue, but maybe it means the boost test framework isn't being used correctly.
-
Add a file for script tests 1b3d682fe3
-
Add file for transaction tests. f5a87ae353
-
Cleanup test suite output to be more useful. 3e1740078f
-
TheBlueMatt commented at 3:57 PM on August 2, 2011: member
OK, updated with better naming... Not really anything that can be done within boost test to make the output more specific, so just name the AUTO_TEST_CASE well and use BOOST_CHECK_MESSAGE instead of BOOST_CHECK
-
sipa commented at 6:15 PM on August 2, 2011: member
ACK.
-
gavinandresen commented at 3:34 PM on August 9, 2011: contributor
Merged after rebasing onto pull #443 (commit 4e5d88 -- apologies if that causes anybody pain).
- gavinandresen closed this on Aug 9, 2011
- ptschip referenced this in commit f4bd5435ec on Apr 19, 2017
- lateminer referenced this in commit 0c1e633617 on Oct 16, 2019
- Losangelosgenetics referenced this in commit cc85f89b16 on Mar 12, 2020
- Losangelosgenetics referenced this in commit e8822d256c on Mar 12, 2020
- rajarshimaitra referenced this in commit e2b4f4342d on Aug 5, 2021
- DrahtBot locked this on Sep 8, 2021