Lines Matching full:example

11 and then sets *expectations* for what should happen. For example:
24 In the above example, ``example_test_success`` always passes because it does
36 logged. For example:
46 In the above example, ``add_test_basic`` makes a number of assertions about the
65 For example, if we want to rigorously test the ``add`` function above, create
97 terminates the test case if the condition is not satisfied. For example:
115 In this example, we need to be able to allocate an array to test the ``sort()``
174 For example:
186 .name = "example",
195 In the above example, the test suite ``example_test_suite`` would first run
227 or hardware specific. For example, we might want to test code that really
241 .. TODO([email protected]): Add an actual example of an architecture-
282 example:
310 In this example, computing the pointer to the child from the pointer to the
323 example, implementing a fake EEPROM that stores the "contents" in an
477 for example: testing a hash function.
480 For example, to test ``sha1sum(1)``, we can write:
500 helper macro variation, for example:
533 * For example, see ``fs/ext4/inode-test.c``.
537 * For example: if we want to test ``sha256sum``, we could add a ``sha256``
601 For example:
629 For example:
651 with the ``KUNIT_DEFINE_ACTION_WRAPPER()`` macro, for example:
661 ``kunit_add_action`` can fail if, for example, the system is out of memory.
674 conditionally export the used symbol. For example:
690 your .c file. For example:
705 Similar to as shown above, we can add test-specific logic. For example:
725 is helpful, for example, when providing a fake implementation of a function, or
735 The example below uses this to implement a "mock" implementation of a function, ``foo``:
769 In this example, we are using the ``priv`` member of ``struct kunit`` as a way
776 flexibility as a ``priv`` member, but also, for example, allowing helper
786 For example, we have an option to enable some extra debug checks on some data
841 For example: