Index: tools/clang/value_cleanup/tests/list-value-append-expected.cc |
diff --git a/tools/clang/value_cleanup/tests/list-value-append-expected.cc b/tools/clang/value_cleanup/tests/list-value-append-expected.cc |
index ad89f7c6ae95a0b0a1ba503f81aa2d18cef06b11..ad347f43baf5be71111139c38c22534fee4a1f1d 100644 |
--- a/tools/clang/value_cleanup/tests/list-value-append-expected.cc |
+++ b/tools/clang/value_cleanup/tests/list-value-append-expected.cc |
@@ -2,10 +2,20 @@ |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
+#include <memory> |
+ |
#include "base/values.h" |
#define true true |
+std::unique_ptr<base::Value> ReturnsUniquePtr() { |
+ return nullptr; |
+} |
+ |
+struct Thing { |
+ std::unique_ptr<base::Value> ToValue() { return nullptr; } |
+}; |
+ |
void F() { |
base::ListValue list; |
list.AppendBoolean(1 == 0); |
@@ -13,4 +23,10 @@ void F() { |
list.AppendInteger(static_cast<unsigned char>(1.0)); |
list.AppendDouble(double{3}); |
list.AppendString("abc"); |
+ |
+ list.Append(ReturnsUniquePtr()); |
+ Thing thing; |
+ list.Append(thing.ToValue()); |
+ std::unique_ptr<base::Value> unique_ptr_var; |
+ list.Append(std::move(unique_ptr_var)); |
} |