OLD | NEW |
(Empty) | |
| 1 // Copyright 2016 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 "blimp/net/helium/helium_result.h" |
| 6 |
| 7 #include "base/macros.h" |
| 8 #include "testing/gtest/include/gtest/gtest.h" |
| 9 |
| 10 namespace blimp { |
| 11 namespace { |
| 12 |
| 13 class HeliumResultTest : public testing::Test { |
| 14 public: |
| 15 HeliumResultTest() {} |
| 16 ~HeliumResultTest() override {} |
| 17 }; |
| 18 |
| 19 TEST_F(HeliumResultTest, HeliumResultToString) { |
| 20 // The exhaustive list of errors need not be specified here, but enough are |
| 21 // specified that we can verify that the switch/case mapping works as |
| 22 // intended. |
| 23 EXPECT_STREQ("OK", HeliumResultToString(HeliumResult::OK)); |
| 24 EXPECT_STREQ("ERR_FAILED", HeliumResultToString(HeliumResult::ERR_FAILED)); |
| 25 EXPECT_STREQ("ERR_CONNECTION_LOST", |
| 26 HeliumResultToString(HeliumResult::ERR_CONNECTION_LOST)); |
| 27 } |
| 28 |
| 29 } // namespace |
| 30 } // namespace blimp |
| 31 |
OLD | NEW |