blob: d6726791682b09b44acdafe4d7e5f2372ef4c2c9 [file] [log] [blame]
Daniel Cheng178560f2024-01-22 19:30:381// 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
12namespace base::test {
13
14// Matcher that verifies a fidl struct is equal to the expected fidl struct.
15MATCHER_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
Lei Zhangc6e08e52024-05-29 01:14:5424#endif // BASE_TEST_FIDL_MATCHERS_H_