9 #include <gmock/gmock.h> 10 #include <gtest/gtest.h> 20 TEST(NegotiatorTest, TestSingle) {
21 std::vector<std::vector<int>> server = {{1}};
22 std::vector<int> client = {1};
27 TEST(NegotiatorTest, TestSingleMismatch) {
28 std::vector<std::vector<int>> server = {{1}};
29 std::vector<int> client = {2};
34 TEST(NegotiatorTest, TestServerPref) {
35 std::vector<std::vector<int>> server = {{1}, {2}, {3}};
36 std::vector<int> client = {3, 1, 2};
41 TEST(NegotiatorTest, TestServerPrefTie) {
42 std::vector<std::vector<int>> server = {{1}, {2, 4}, {3}};
43 std::vector<int> client = {5, 6, 4, 2};
48 TEST(NegotiateTest, TestSingleOrdering) {
49 std::vector<int> server = {1, 2, 3};
50 std::vector<int> client = {3, 1, 2};
55 TEST(NegotiateTest, TestSingleOrderingLast) {
56 std::vector<int> server = {4, 5, 3};
57 std::vector<int> client = {3, 1, 2};
62 TEST(NegotiateTest, TestSingleOrderingNoMatch) {
63 std::vector<int> server = {1, 5, 6};
64 std::vector<int> client = {3, 4, 2};
69 TEST(NegotiateTest, TestServerEmptyTier) {
70 std::vector<std::vector<int>> server = {{}, {4}};
71 std::vector<int> client = {3, 4, 2};
#define EXPECT_EQ(val1, val2)
folly::Optional< T > negotiate(const std::vector< std::vector< T >> &serverPref, const std::vector< T > &clientPref)
TEST(GTestEnvVarTest, Dummy)
#define EXPECT_FALSE(condition)