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(brendanhiggins@google.com): 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``
627 Below is an example of how it works:
633 // Example generator function. It produces a sequence of buffer sizes that
708 please refer to lib/kunit/kunit-example-test.c.
713 * Example of a parameterized test param_init() function that registers a dynamic
793 code please refer to lib/kunit/kunit-example-test.c.
829 /* Example test that uses shared resources in test->resources. */
869 The code below demonstrates example usage of the ``priv`` field for shared
933 For example:
961 For example:
983 with the ``KUNIT_DEFINE_ACTION_WRAPPER()`` macro, for example:
993 ``kunit_add_action`` can fail if, for example, the system is out of memory.
1038 For a full example, see this `patch <https://lore.kernel.org/all/20221207014024.340230-3-rmoar@goog…
1044 if needed. For example:
1059 Similar to as shown above, we can add test-specific logic. For example:
1079 is helpful, for example, when providing a fake implementation of a function, or
1089 The example below uses this to implement a "mock" implementation of a function, ``foo``:
1123 In this example, we are using the ``priv`` member of ``struct kunit`` as a way
1130 flexibility as a ``priv`` member, but also, for example, allowing helper
1140 For example, we have an option to enable some extra debug checks on some data
1195 For example: