Chromium Code Reviews| Index: blimp/net/helium/helium_result_unittest.cc |
| diff --git a/blimp/net/helium/helium_result_unittest.cc b/blimp/net/helium/helium_result_unittest.cc |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..76c809ebe88ea204be1721afe5419a7edd3621ba |
| --- /dev/null |
| +++ b/blimp/net/helium/helium_result_unittest.cc |
| @@ -0,0 +1,31 @@ |
| +// Copyright 2016 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#include "blimp/net/helium/helium_result.h" |
| + |
| +#include "base/macros.h" |
| +#include "testing/gtest/include/gtest/gtest.h" |
| + |
| +namespace blimp { |
| +namespace { |
| + |
| +class HeliumResultTest : public testing::Test { |
| + public: |
| + HeliumResultTest() {} |
| + ~HeliumResultTest() override {} |
|
Wez
2016/10/08 00:44:53
Do we need a test fixture base, given that it does
|
| +}; |
| + |
| +TEST_F(HeliumResultTest, HeliumResultToString) { |
| + // The exhaustive list of errors need not be specified here, but enough are |
| + // specified that we can verify that the switch/case mapping works as |
| + // intended. |
| + EXPECT_STREQ("SUCCESS", HeliumResultToString(HeliumResult::SUCCESS)); |
| + EXPECT_STREQ("ERR_INTERNAL_ERROR", |
| + HeliumResultToString(HeliumResult::ERR_INTERNAL_ERROR)); |
| + EXPECT_STREQ("ERR_DISCONNECTED", |
| + HeliumResultToString(HeliumResult::ERR_DISCONNECTED)); |
| +} |
| + |
| +} // namespace |
| +} // namespace blimp |