aboutsummaryrefslogtreecommitdiff
path: root/src/test
AgeCommit message (Collapse)Author
2013-12-16Improve unit test code not to compare with explanatory messages for each ↵Kangmo
platform. Instead, use have an exception object to check if the string returned by what() on the raised exception matches the string returned by what() on the expected exception instance. This way, we do not need to list all different possible explanatory strings for different platforms in the test code, and make it simple. (The idea is by Cory Fields.)
2013-12-15Fix unit test error on OSX 10.9 using Apple LLVM v5.0.Kangmo
Before the fix, there were 6 errors such as : serialize_tests.cpp:77: error in "noncanonical": incorrect exception std::ios_base::failure is caught It turns out that ex.what() returns following string instead of "non-canonical ReadCompactSize()" "non-canonical ReadCompactSize(): unspecified iostream_category error" After the fix, unit test passed. The test ran using Apple LLVM v5.0 on OSX 10.9 and the unit test error happened because of different error messages by different compilers. g++ --version on my development environment. ``` Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1 Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn) Target: x86_64-apple-darwin13.0.0 Thread model: posix ```
2013-12-11Add tests for correct and incorrect order of signatures for a multisigTamas Blummer
(P2SH)
2013-12-09Merge pull request #3368 from laanwj/2013_11_disable_wallet_miningGavin Andresen
Allow mining RPCs with --disable-wallet
2013-12-09Re-enable miner tests in --disable-wallet modeWladimir J. van der Laan
Use a fixed script instead of a CReserveKey from the wallet. This does not affect the functionality or result of the tests as they never check the state of the wallet in the first place.
2013-12-08Add main-specific node statePieter Wuille
2013-12-04Split off rpc_wallet_testsWladimir J. van der Laan
Split wallet tests from other RPC tests. Now no #ifdef ENABLE_WALLET are needed anymore in either file.
2013-12-04Add --disable-wallet option to build systemWladimir J. van der Laan
Make it possible to build Bitcoin without wallet (and thus without BDB) so that it only functions as node.
2013-12-04Delimit code with #ifdef ENABLE_WALLETWladimir J. van der Laan
Delimit all code that uses the wallet functions in implementation files that conditionally use the wallet.
2013-12-03Merge pull request #3320 from laanwj/2013_11_cli_splitGavin Andresen
bitcoin-cli: remove unneeded dependencies (only minor code movement)
2013-12-03bitcoin-cli: remove unneeded dependencies (only code movement)Wladimir J. van der Laan
Remove unnecessary dependencies for bitcoin-cli (leveldb, berkelydb, wallet, RPC server) Build system changes: - split libbitcoin.a into libbitcoin_common.a, libbitcoin_server.a and libbitcoin_cli.a Code changes (movement only): - split up HelpMessage into HelpMessage in init.cpp and HelpMessageCli in rpcclient.cpp - move uiInterface from init.cpp to util.cpp
2013-12-02Make unit tests succeed with -DDEBUG_LOCKORDERGavin Andresen
2013-11-30Add verbose boolean to getrawmempoolGavin Andresen
Also changes mempool to store CTxMemPoolEntries to keep track of when they enter/exit the pool.
2013-11-27Split up bitcoinrpc (code movement only)Wladimir J. van der Laan
Split bitcoinrpc up into - rpcserver: bitcoind RPC server - rpcclient: bitcoin-cli RPC client - rpcprotocol: shared common HTTP/JSON-RPC protocol code One step towards making bitcoin-cli independent from the rest of the code, and thus a smaller executable that doesn't have to be linked against leveldb. This commit only does code movement, there are no functional changes.
2013-11-13tests: add testcases for strprintfWladimir J. van der Laan
2013-11-11configure: Simplify common AM_CPPFLAGS and AM_LDFLAGS to a Makefile.commonLuke Dashjr
2013-11-11Test alerts high at high PROTOCOL_VERSIONsGavin Andresen
I regenerated the alert test data; now alerts are tested against a protocol version way above the current protocol version. So we won't have to regenerate them every time we bump PROTOCOL_VERSION in the future.
2013-11-10Cleanup code using forward declarations.Brandon Dahler
Use misc methods of avoiding unnecesary header includes. Replace int typedefs with int##_t from stdint.h. Replace PRI64[xdu] with PRI[xdu]64 from inttypes.h. Normalize QT_VERSION ifs where possible. Resolve some indirect dependencies as direct ones. Remove extern declarations from .cpp files.
2013-11-08Merge pull request #3223 from TheBlueMatt/masterWladimir J. van der Laan
Test changes
2013-11-08Add a few more basic script/tx test-cases.Matt Corallo
2013-11-04Merge pull request #3076 from lano1106/uint256_utilWladimir J. van der Laan
Make util phexdigit array reusable
2013-11-01Merge pull request #3128Gavin Andresen
0056095 Show short scriptPubKeys correctly (Peter Todd) 22de68d Relay OP_RETURN TxOut as standard transaction type (Peter Todd) Signed-off-by: Gavin Andresen <gavinandresen@gmail.com>
2013-10-29Bug fix: CDataStream::GetAndClear() when nReadPos > 0Gavin Andresen
Changed CDataStream::GetAndClear() to use the most obvious get get and clear instead of a tricky swap(). Added a unit test for CDataStream insert/erase/GetAndClear. Note: GetAndClear() is not performance critical, it is used only by the send-a-message-to-the-network code. Bug was not noticed before now because the send-a-message code never erased from the stream.
2013-10-27Make util phexdigit array reusableOlivier Langlois
class template base_uint had its own private lookup table. This is saving 256 bytes per instantiation. The result is not spectacular as bitcoin-qt has only shrinked of about 1Kb but it is still valid improvement. Also, I have replaced a for loop with a memset() call. Made CBigNum::SetHex() use the new HexDigit() function. Signed-off-by: Olivier Langlois <olivier@olivierlanglois.net>
2013-10-24Relay OP_RETURN TxOut as standard transaction typePeter Todd
Also fix decoderawtransaction to not show reqSigs or addresses for nulldata txouts. (Previous version also left reqSigs uninitialized mistakenly)
2013-10-23Add test for monetary value parsingWladimir J. van der Laan
Just-in-case sanity test for JSON spirit and AmountFromValue. Also update rpc_format_monetary_values test to use ValueFromAmount, so that ValueFromAmount is also tested.
2013-10-23Add test for monetary value formattingWladimir J. van der Laan
Tests for issue #3126. This problem pops up after upgrading json-spirit.
2013-10-22Revert "Switch to using raw_utf8"Jeff Garzik
This reverts commit 2ecb7555a9df1e843fd25f588819e4ca1d94b266.
2013-10-22Merge pull request #2740 from constantined/constantinedGavin Andresen
UTF-8 support for JSON-RPC
2013-10-21Merge pull request #2738 from jgarzik/op_returnGavin Andresen
Relay OP_RETURN data TxOut as standard transaction type.
2013-10-19Merge pull request #2884 from gavinandresen/canonicalsizes2Gavin Andresen
Reject non-canonically-encoded CompactSize
2013-10-16Merge pull request #2645 from sipa/inlinesighashGavin Andresen
Inline signature serializer
2013-10-11Refactor/encapsulate chain globals into a CChain classPieter Wuille
2013-10-02Relay OP_RETURN data TxOut as standard transaction typeJeff Garzik
2013-09-29Merge pull request #3015 from theuni/win32-version-infoPieter Wuille
Win32 version info
2013-09-28Inline signature serializerPieter Wuille
Instead of building a full copy of a CTransaction being signed, and then modifying bits and pieces until its fits the form necessary for computing the signature hash, use a wrapper serializer that only serializes the necessary bits on-the-fly. This makes it easier to see which data is actually being hash, reduces load on the heap, and also marginally improves performances (around 3-4us/sigcheck here). The performance improvements are much larger for large transactions, though. The old implementation of SignatureHash is moved to a unit tests, to test whether the old and new algorithm result in the same value for randomly-constructed transactions.
2013-09-19Fix minor unit test memory leaksPieter Wuille
2013-09-18autotools: fix the Makefile.include to be safely included anywhere.Cory Fields
This way we can reuse rules rather than duplicating them.
2013-09-16included-tests: generate binary data from test files for inclusion into test ↵Cory Fields
binaries This change moves test data into the binaries rather than reading them from the disk at runtime. Advantages: - Tests become distributable - Cross-compile friendly. Build on one machine and execute in an arbitrary location on another. - Easier testing for backports. Users can verify that tests pass without having to track down corresponding test data. - More trustworthy test results and easier quality assurance as tests make fewer assumptions about their environment. - Tests could theoretically run at client/daemon startup and exit on failure. Disadvantages: - Required 'hexdump' build-dependency. This is a standard bsd tool that should be usable everywhere. It is likely already installed on all build-machines. - Tests can no longer be fudged after build by altering test-data.
2013-09-10Bugfix: Since test_bitcoin is being built and run inside src/test/, try ↵Luke Dashjr
using relative directories from that point
2013-09-10autotools: use an absolute path to test dataCory Fields
2013-09-05autotools: switch to autotools buildsystemCory Fields
2013-08-25Merge pull request #2928 from jgarzik/cnb-txoutJeff Garzik
CreateNewBlock / getblocktemplate cleaning
2013-08-25Document and test OP_RESERVED weirdnessPeter Todd
Seems it was forgotten about when IsPushOnly() and the unittests were written. A particular oddity is that OP_RESERVED doesn't count towards the >201 opcode limit unlike every other named opcode.
2013-08-24CreateNewBlock() now takes scriptPubKey argument,Jeff Garzik
rather than a key. CreateNewBlockWithKey() helper is added to restore existing functionality, making this an equivalent-transformation change.
2013-08-20Add MurmurHash3() unit testPeter Todd
Useful as a source of test vectors to anyone re-implementing bloom filters.
2013-08-15Merge pull request #2880 from gavinandresen/test_numequalGavin Andresen
More unit tests for OP_NUMEQUAL
2013-08-15Merge pull request #2886 from gavinandresen/rpctimingGavin Andresen
Make RPC password resistant to timing attacks
2013-08-15Merge pull request #2131 from sipa/evensGregory Maxwell
Only create signatures with even S, and verification mode to check.
2013-08-15Merge pull request #2829 from sipa/bip32Gavin Andresen
BIP 32 derivation + test vectors