1 // Copyright 2024 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. 4 5 #ifndef BASE_TEST_FIDL_MATCHERS_H_ 6 #define BASE_TEST_FIDL_MATCHERS_H_ 7 8 #include <lib/fidl/cpp/comparison.h> 9 10 #include "testing/gmock/include/gmock/gmock-matchers.h" 11 12 namespace base::test { 13 14 // Matcher that verifies a fidl struct is equal to the expected fidl struct. 15 MATCHER_P(FidlEq, 16 expected, 17 "Matches if the expected fidl struct is equal to the argument per " 18 "fidl::Equals().") { 19 return fidl::Equals(arg, expected); 20 } 21 22 } // namespace base::test 23 24 #endif // BASE_TEST_PROTOBUF_MATCHERS_H_ 25