Skip to content

Commit fad3035

Browse files
author
MarcoFalke
committed
[doc] Minor markdown fixes
1 parent a775182 commit fad3035

File tree

3 files changed

+18
-18
lines changed

3 files changed

+18
-18
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ lots of money.
4848

4949
### Automated Testing
5050

51-
Developers are strongly encouraged to write unit tests for new code, and to
51+
Developers are strongly encouraged to write [unit tests](/doc/unit-tests.md) for new code, and to
5252
submit new unit tests for old code. Unit tests can be compiled and run
5353
(assuming they weren't disabled in configure) with: `make check`
5454

doc/developer-notes.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ General Bitcoin Core
218218
- *Rationale*: RPC allows for better automatic testing. The test suite for
219219
the GUI is very limited
220220

221-
- Make sure pulls pass Travis CI before merging
221+
- Make sure pull requests pass Travis CI before merging
222222

223223
- *Rationale*: Makes sure that they pass thorough testing, and that the tester will keep passing
224224
on the master branch. Otherwise all new pull requests will start failing the tests, resulting in
@@ -230,9 +230,9 @@ General Bitcoin Core
230230
Wallet
231231
-------
232232

233-
- Make sure that that no crashes happen with run-time option `-disablewallet`.
233+
- Make sure that no crashes happen with run-time option `-disablewallet`.
234234

235-
- *Rationale*: In RPC code that conditionally use the wallet (such as
235+
- *Rationale*: In RPC code that conditionally uses the wallet (such as
236236
`validateaddress`) it is easy to forget that global pointer `pwalletMain`
237237
can be NULL. See `qa/rpc-tests/disablewallet.py` for functional tests
238238
exercising the API with `-disablewallet`
@@ -250,9 +250,9 @@ General C++
250250
with assertions disabled, having side-effects in assertions is unexpected and
251251
makes the code harder to understand
252252

253-
- If you use the .h, you must link the .cpp
253+
- If you use the `.h`, you must link the `.cpp`
254254

255-
- *Rationale*: Include files are the interface for the implementation file. Including one but
255+
- *Rationale*: Include files define the interface for the code in implementation files. Including one but
256256
not linking the other is confusing. Please avoid that. Moving functions from
257257
the `.h` to the `.cpp` should not result in build errors
258258

@@ -264,11 +264,11 @@ General C++
264264
C++ data structures
265265
--------------------
266266

267-
- Never use the std::map [] syntax when reading from a map, but instead use .find()
267+
- Never use the `std::map []` syntax when reading from a map, but instead use `.find()`
268268

269-
- *Rationale*: [] does an insert (of the default element) if the item doesn't
269+
- *Rationale*: `[]` does an insert (of the default element) if the item doesn't
270270
exist in the map yet. This has resulted in memory leaks in the past, as well as
271-
race conditions (expecting read-read behavior). Using [] is fine for *writing* to a map
271+
race conditions (expecting read-read behavior). Using `[]` is fine for *writing* to a map
272272

273273
- Do not compare an iterator from one data structure with an iterator of
274274
another data structure (even if of the same type)
@@ -304,18 +304,18 @@ C++ data structures
304304
Strings and formatting
305305
------------------------
306306

307-
- Be careful of LogPrint versus LogPrintf. LogPrint takes a 'category' argument, LogPrintf does not.
307+
- Be careful of `LogPrint` versus `LogPrintf`. `LogPrint` takes a `category` argument, `LogPrintf` does not.
308308

309309
- *Rationale*: Confusion of these can result in runtime exceptions due to
310310
formatting mismatch, and it is easy to get wrong because of subtly similar naming
311311

312-
- Use std::string, avoid C string manipulation functions
312+
- Use `std::string`, avoid C string manipulation functions
313313

314314
- *Rationale*: C++ string handling is marginally safer, less scope for
315-
buffer overflows and surprises with \0 characters. Also some C string manipulations
315+
buffer overflows and surprises with `\0` characters. Also some C string manipulations
316316
tend to act differently depending on platform, or even the user locale
317317

318-
- Use ParseInt32, ParseInt64, ParseDouble from `utilstrencodings.h` for number parsing
318+
- Use `ParseInt32`, `ParseInt64`, `ParseDouble` from `utilstrencodings.h` for number parsing
319319

320320
- *Rationale*: These functions do overflow checking, and avoid pesky locale issues
321321

doc/unit-tests.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
Compiling/running unit tests
22
------------------------------------
33

4-
Unit tests will be automatically compiled if dependencies were met in configure
4+
Unit tests will be automatically compiled if dependencies were met in `./configure`
55
and tests weren't explicitly disabled.
66

7-
After configuring, they can be run with 'make check'.
7+
After configuring, they can be run with `make check`.
88

9-
To run the bitcoind tests manually, launch src/test/test_bitcoin .
9+
To run the bitcoind tests manually, launch `src/test/test_bitcoin`.
1010

1111
To add more bitcoind tests, add `BOOST_AUTO_TEST_CASE` functions to the existing
12-
.cpp files in the test/ directory or add new .cpp files that
12+
.cpp files in the `test/` directory or add new .cpp files that
1313
implement new BOOST_AUTO_TEST_SUITE sections.
1414

15-
To run the bitcoin-qt tests manually, launch src/qt/test/test_bitcoin-qt
15+
To run the bitcoin-qt tests manually, launch `src/qt/test/test_bitcoin-qt`
1616

1717
To add more bitcoin-qt tests, add them to the `src/qt/test/` directory and
1818
the `src/qt/test/test_main.cpp` file.

0 commit comments

Comments
 (0)