diff options
author | Andreas Schneider <asn@cryptomilk.org> | 2020-02-03 17:49:30 +0100 |
---|---|---|
committer | Andreas Schneider <asn@cryptomilk.org> | 2020-02-03 17:49:30 +0100 |
commit | 3c60c4a4a4e9012b88e1f761ec2668358036d61b (patch) | |
tree | c24dd514f28cbd766dcf332193cb532ca7d5a4a4 | |
parent | e93351b92f080987b1fa88a379d235a1e1d8c6df (diff) | |
download | cmocka-3c60c4a4a4e9012b88e1f761ec2668358036d61b.tar.gz cmocka-3c60c4a4a4e9012b88e1f761ec2668358036d61b.tar.xz cmocka-3c60c4a4a4e9012b88e1f761ec2668358036d61b.zip |
-rw-r--r-- | slides.md | 54 |
1 files changed, 54 insertions, 0 deletions
@@ -525,6 +525,51 @@ note: --- +## Test driven development (Part 1) + +1. Create a function and implement the default algorithm +2. Write a test for it and check that it works + +note: +## Test driven development + +1. Create a function and implement the default algorithm +2. Write a test for it and check that it works + +<!-- .slide: class="tetris-one" --> + +--- + +## Test driven development (Part 2) + +3. Implement a negative test and fix error checking in your function +4. Implement test variations and improve your function + +note: +## Test driven development + +3. Implement a negative test and fix error checking in your function +4. Implement test variations and improve your function + +<!-- .slide: class="tetris-one" --> + +--- + +## Best practice tips + +* Include C files so you can **test static functions** +* Build a **static library** for linking with unit tests + +note: +## Best practice tips + +* Include C files so you can **test static functions** +* Build a **static library** for linking with unit tests + +<!-- .slide: class="tetris-one" --> + +--- + # Mocking in unit tests note: @@ -844,6 +889,15 @@ in our mock function if needed! <!-- .slide: class="tetris-two center" --> + +--- + +## Mocking test + +<img src="img/unit_test_wrap_read_proc_uptime.svg" border="0" /> + +<!-- .slide: class="tetris-two center" --> + --- ## Symbol binding order! |