Lines Matching full:we
5 For the purposes of this tutorial, we'll be setting up an environment in Docker.
8 same way that others working on the project are. Finally, we can get away with
10 bot, so we have even more confidence that we're running relevant tests the way
36 We also need to put a copy of the project you want to test against here. But
37 you've probably got a copy checked out already, so we're going to make a _git
65 (`/my/dir/for/phosphor-host-ipmid`), so we'll need to mount it when we run. Open
67 find where we call `docker run`, way down at the bottom. Add an additional
159 For this tutorial, we'll be adding some basic unit testing of the struct
199 We'll create the tests in `test/sensorhandler_unittest.cpp`; go ahead and start
210 Let's plan the test cases we care about before we build any additional
211 scaffolding. We've only got two functions - `get_reservation_id()` and
212 `get_record_id()`. We want to test:
235 For `get_record_id()`, we have pretty much the same set of tests:
254 insulate against because it's possible to cast anything to a `GetSdrReq*` if we
257 complicated code! We'll talk more about this in the Best Practices section
261 `get_record_id()` will be identical, so we won't cover them here.
263 For the happy path, we want to make it very clear that the test value we're
264 using is within range, so we express it in binary. We also want to be able to
265 ensure that the MSB and LSB are being combined in the correct order, so we make
267 expected ID here). Finally, we want it to be obvious to the reader if we have
268 populated the `GetSdrReq` incorrectly, so we've labeled all the fields. Since we
288 We don't expect that our `GetSdrReq` pointer will ever be null; in this case,
290 specify that in the unlikely case we're given a null pointer, we die. We don't
300 Finally, while negative values are taken care of by C++'s type system, we can at
323 Finally, we'll need to add the new tests to `test/Makefile.am`. You can mimic
383 testbench. It's not enough to know that the code works when it's supposed to; we