| Index: third_party/WebKit/Source/platform/wtf/PtrUtilTest.cpp
|
| diff --git a/third_party/WebKit/Source/platform/wtf/PtrUtilTest.cpp b/third_party/WebKit/Source/platform/wtf/PtrUtilTest.cpp
|
| index aabb90986f351927a9aa56e193da5c5a6eded3b7..0914a6714214892575ea87394527ec8d5b0a3598 100644
|
| --- a/third_party/WebKit/Source/platform/wtf/PtrUtilTest.cpp
|
| +++ b/third_party/WebKit/Source/platform/wtf/PtrUtilTest.cpp
|
| @@ -6,9 +6,33 @@
|
|
|
| #include "testing/gtest/include/gtest/gtest.h"
|
|
|
| +namespace WTF {
|
| +
|
| +TEST(WTF_PtrUtilTest, canWrapUnique) {
|
| + auto charPtr = new char;
|
| + auto wrappedCharPtr = wrapUnique(charPtr);
|
| +
|
| + ASSERT_TRUE(wrappedCharPtr.get());
|
| +}
|
| +
|
| +TEST(WTF_PtrUtilTest, canWrapUniqueArray) {
|
| + constexpr size_t bufferSize = 20;
|
| + auto charArray = new char[bufferSize];
|
| + auto wrappedCharArray = wrapArrayUnique(charArray);
|
| +
|
| + ASSERT_TRUE(wrappedCharArray.get());
|
| +}
|
| +
|
| +TEST(WTF_PtrUtilTest, canMakeUnique) {
|
| + auto charPtr = makeUnique<char>();
|
| +
|
| + ASSERT_TRUE(charPtr.get());
|
| +}
|
| +
|
| TEST(WTF_PtrUtilTest, canMakeUniqueArray) {
|
| constexpr size_t bufferSize = 20;
|
| - auto charArray = WTF::makeUnique<char[]>(bufferSize);
|
| + auto charArray = makeUnique<char[]>(bufferSize);
|
|
|
| ASSERT_TRUE(charArray.get());
|
| }
|
| +}
|
|
|