1// Copyright (c) 2010 The Chromium Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#include "net/base/ssl_cipher_suite_names.h"
6#include "testing/gtest/include/gtest/gtest.h"
7
8namespace net {
9
10namespace {
11
12TEST(CipherSuiteNamesTest, Basic) {
13  const char *key_exchange, *cipher, *mac;
14  SSLCipherSuiteToStrings(&key_exchange, &cipher, &mac, 0xc001);
15  EXPECT_STREQ(key_exchange, "ECDH_ECDSA");
16  EXPECT_STREQ(cipher, "NULL");
17  EXPECT_STREQ(mac, "SHA1");
18
19  SSLCipherSuiteToStrings(&key_exchange, &cipher, &mac, 0xff31);
20  EXPECT_STREQ(key_exchange, "???");
21  EXPECT_STREQ(cipher, "???");
22  EXPECT_STREQ(mac, "???");
23}
24
25}  // anonymous namespace
26
27}  // namespace net
28