proxygen
Main Page
Related Pages
Namespaces
Classes
Files
Examples
File List
File Members
Matchers.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2018-present, Facebook, Inc.
3
* All rights reserved.
4
*
5
* This source code is licensed under the BSD-style license found in the
6
* LICENSE file in the root directory of this source tree.
7
*/
8
9
#pragma once
10
11
#include <gmock/gmock.h>
12
#include <gtest/gtest.h>
13
14
namespace
fizz
{
15
namespace
test
{
16
17
MATCHER_P
(BufMatches, expected,
""
) {
18
return
folly::IOBufEqualTo
()(
folly::IOBuf::copyBuffer
(expected), arg);
19
}
20
21
MATCHER_P
(RangeMatches, expected,
""
) {
22
folly::StringPiece
exp(expected);
23
return
exp.
size
() == arg.size() &&
24
(exp.
size
() == 0 || memcmp(exp.
data
(), arg.data(), exp.
size
()) == 0);
25
}
26
}
// namespace test
27
}
// namespace fizz
fizz::test::MATCHER_P
MATCHER_P(WriteNewSessionTicketMatches, expected,"")
Definition:
FizzBaseTest.cpp:36
test
folly::Range::size
constexpr size_type size() const
Definition:
Range.h:431
folly::IOBufEqualTo
Definition:
IOBuf.h:1549
folly::Range::data
constexpr Iter data() const
Definition:
Range.h:446
fizz
Definition:
Actions.h:16
folly::Range< const char * >
folly::IOBuf::copyBuffer
static std::unique_ptr< IOBuf > copyBuffer(const void *buf, std::size_t size, std::size_t headroom=0, std::size_t minTailroom=0)
Definition:
IOBuf.h:1587
proxygen
fizz
fizz
protocol
test
Matchers.h
Generated by
1.8.11