aboutsummaryrefslogtreecommitdiff
path: root/src/test/alert_tests.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Split up util.cpp/hWladimir J. van der Laan2014-08-261-0/+1
| | | | | | | | | | | | | | | | Split up util.cpp/h into: - string utilities (hex, base32, base64): no internal dependencies, no dependency on boost (apart from foreach) - money utilities (parsesmoney, formatmoney) - time utilities (gettime*, sleep, format date): - and the rest (logging, argument parsing, config file parsing) The latter is basically the environment and OS handling, and is stripped of all utility functions, so we may want to rename it to something else than util.cpp/h for clarity (Matt suggested osinterface). Breaks dependency of sha256.cpp on all the things pulled in by util.
* Simplify serialize.h's exception handlingPieter Wuille2014-08-091-1/+1
| | | | | | | | | | | | | | | Remove the 'state' and 'exceptmask' from serialize.h's stream implementations, as well as related methods. As exceptmask always included 'failbit', and setstate was always called with bits = failbit, all it did was immediately raise an exception. Get rid of those variables, and replace the setstate with direct exception throwing (which also removes some dead code). As a result, good() is never reached after a failure (there are only 2 calls, one of which is in tests), and can just be replaced by !eof(). fail(), clear(n) and exceptions() are just never called. Delete them.
* Add licenses for tests and test dataWladimir J. van der Laan2014-03-181-0/+4
| | | | | | | | - Add license headers to source files (years based on commit dates) in `src/test` as well as `qa` - Add `README.md` to `src/test/data` specifying MIT license Fixes #3848
* Test alerts high at high PROTOCOL_VERSIONsGavin Andresen2013-11-111-5/+5
| | | | | | | | | 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.
* Cleanup code using forward declarations.Brandon Dahler2013-11-101-5/+9
| | | | | | | | | 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.
* included-tests: generate binary data from test files for inclusion into test ↵Cory Fields2013-09-161-18/+5
| | | | | | | | | | | | | | | | | | | | | | 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.
* Bugfix: Since test_bitcoin is being built and run inside src/test/, try ↵Luke Dashjr2013-09-101-1/+4
| | | | using relative directories from that point
* -alertnotify=<cmd>Gavin Andresen2013-03-191-29/+82
| | | | | | Runs a shell command when an AppliesToMe() alert is received. %s in the <cmd> string is replaced with the alert.strStatusBar message.
* Some unit tests for CAlertGavin Andresen2013-03-191-0/+132