| // Copyright 2019 PDFium Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| #include "core/fxcrt/fx_memory_wrappers.h" |
| #include "build/build_config.h" |
| #include "testing/gtest/include/gtest/gtest.h" |
| TEST(fxcrt, FxFreeDeleter) { |
| std::unique_ptr<int, FxFreeDeleter> empty(nullptr); |
| std::unique_ptr<int, FxFreeDeleter> thing(FX_Alloc(int, 1)); |
| std::unique_ptr<int, FxFreeDeleter> several(FX_Alloc(int, 100)); |
| TEST(fxcrt, FxAllocAllocator) { |
| std::vector<int, FxAllocAllocator<int>> vec; |
| std::vector<int, FxAllocAllocator<int>> vec2 = vec; |