![]() |
Lumiera 0.pre.04
»edit your freedom«
|
This test places a given (or random) string into a heap malloced buffer, and then pushes the "hot potato" of ownership responsibility around; another function checks the content of the buffer and consumes the token as a side-effect. At the end, there should be no memory leak and the ownership token should be empty.
Definition at line 68 of file unique-malloc-owner-test.cpp.
Private Types | |
| using | CharOwner = UniqueMallocOwner< char > |
Private Member Functions | |
| virtual void | run (Arg args) |
| CharOwner | place_into_malloced_buffer (string probeString) |
| void | verify_and_consume (CharOwner hotPotato, string refString) |
|
private |
Definition at line 71 of file unique-malloc-owner-test.cpp.
|
inlineprivatevirtual |
Definition at line 74 of file unique-malloc-owner-test.cpp.
References UniqueMallocOwner_test::place_into_malloced_buffer(), lib::test::randStr(), and UniqueMallocOwner_test::verify_and_consume().
Here is the call graph for this function:
|
inlineprivate |
Definition at line 86 of file unique-malloc-owner-test.cpp.
Referenced by UniqueMallocOwner_test::run().
Here is the caller graph for this function:
|
inlineprivate |
Definition at line 95 of file unique-malloc-owner-test.cpp.
Referenced by UniqueMallocOwner_test::run().
Here is the caller graph for this function:
Inheritance diagram for UniqueMallocOwner_test:
Collaboration diagram for UniqueMallocOwner_test: