1 // Copyright 2020 The Chromium Authors
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "base/functional/identity.h"
9 #include "testing/gtest/include/gtest/gtest.h"
13 TEST(FunctionalTest, Identity) {
14 static constexpr identity id;
17 EXPECT_EQ(&v, &id(v));
19 constexpr int arr = {0};
20 static_assert(arr == id(arr), "");