invalid allocator which only allocate nullptr
| 765 | |
| 766 | // invalid allocator which only allocate nullptr |
| 767 | class InvalidAllocator { |
| 768 | public: |
| 769 | static void* Malloc(size_t) { return nullptr; } |
| 770 | static void* Realloc(void*, size_t, size_t) { return nullptr; } |
| 771 | |
| 772 | static void Free(void*) { return; } |
| 773 | static constexpr bool kNeedFree = true; |
| 774 | }; |
| 775 | |
| 776 | TEST(DNodeTest, AllocatorReturnNull) { |
| 777 | using NodeType = DNode<InvalidAllocator>; |
nothing calls this directly
no outgoing calls
no test coverage detected