Initial state: the previous commit does not modify a c, h or cpp file.
arc unit
Should return:
SKIP No unit test to run
arc unit --trace --everything
Should return:
PASS <duration> Bitcoin unit tests
Check in the trace output that all the unit tests are run.
Add a comment in the file `src/test/addrman_tests.cpp'
arc unit --trace
Should return:
PASS <duration> Bitcoin unit tests
Check in the trace output that the addrman_tests test is run.
Reset the changes in `src/test/addrman_tests.cpp'.
Add a comment in the file `src/addrman.cpp'
arc unit --trace
Should return:
PASS <duration> Bitcoin unit tests
Check in the trace output that the following tests are run:
```
addrman_tests,avalanche_tests,DoS_tests,main_tests,net_tests
```
Reset the changes in `src/addrman.cpp'.
Add a comment in the file `src/addrman.h'
arc unit --trace
Should return:
PASS <duration> Bitcoin unit tests
Check in the trace output that the same tests are run than in the
previous list.
Reset the changes in `src/addrman.h'.
Add a comment in the file `src/wallet/wallet.h'
arc unit --trace
Should return:
PASS <duration> Bitcoin unit tests
Check in the trace output that the following tests are run:
```
wallet_test_fixture,accounting_tests,wallet_tests,walletdb_tests
```
Reset the changes in `src/wallet/wallet.h'.
In the file `src/test/addrman_tests.cpp`, modify the line (currently
87):
BOOST_CHECK_EQUAL(addrman.size(), 0);
To:
BOOST_CHECK_EQUAL(addrman.size(), 1);
Then run:
arc unit
Should return:
```
FAIL addrman_tests.cpp
addrman_tests/addrman_simple(87): addrman.size() == 1
```
Still in the file `src/test/addrman_tests.cpp`, modify the line
(currently 94):
BOOST_CHECK_EQUAL(addrman.size(), 1);
To:
BOOST_CHECK_EQUAL(addrman.size(), 2);
In the file `src/test/allocator_tests.cpp`, modify the line (currently
24):
BOOST_CHECK(chunk != nullptr);
To:
BOOST_CHECK(chunk == nullptr);
Then run:
arc unit
Should return:
```
FAIL addrman_tests.cpp
addrman_tests/addrman_simple(87): addrman.size() == 1
addrman_tests/addrman_simple(94): addrman.size() == 2
FAIL allocator_tests.cpp
allocator_tests/arena_tests(24): chunk == nullptr
```
Reset the changes in `src/test/addrman_tests.cpp` and
`src/test/allocator_tests.cpp`.