proxygen
ExporterTest.cpp
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 #include <gtest/gtest.h>
10 
11 #include <fizz/protocol/Exporter.h>
12 
13 using namespace folly;
14 using namespace testing;
15 
16 namespace fizz {
17 namespace test {
18 
19 StringPiece exporter_master = {"12345678901234567890123456789012"};
20 StringPiece label = {"EXPORTER-Token-Binding"};
22  "55549d2d280d8507823a80c2ee69530e5dcc6a04e86f1bae1ef23a86337341a8"};
23 
24 TEST(ExporterTest, TestExporterBasic) {
25  auto ekm = Exporter::getEkm(
26  CipherSuite::TLS_AES_128_GCM_SHA256,
27  folly::Range<const char*>(exporter_master),
28  label,
29  nullptr,
30  32);
31 
32  EXPECT_EQ(StringPiece(ekm->coalesce()), unhexlify(basic_expected_ekm));
33 }
34 } // namespace test
35 } // namespace fizz
bool unhexlify(const InputString &input, OutputString &output)
Definition: String-inl.h:616
#define EXPECT_EQ(val1, val2)
Definition: gtest.h:1922
StringPiece exporter_master
—— Concurrent Priority Queue Implementation ——
Definition: AtomicBitSet.h:29
StringPiece basic_expected_ekm
Definition: Actions.h:16
Range< const char * > StringPiece
TEST(SequencedExecutor, CPUThreadPoolExecutor)
StringPiece label