Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3563)

Unified Diff: blimp/net/helium/helium_result_unittest.cc

Issue 2385913002: Define canonical enum for "HeliumResult" status values. (Closed)
Patch Set: Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« blimp/net/helium/helium_result.cc ('K') | « blimp/net/helium/helium_result.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..22af5b22114cf4b31d4d3699c6fe46962cc5a009
--- /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 {}
+};
+
+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("OK", HeliumResultToString(HeliumResult::OK));
+ EXPECT_STREQ("ERR_FAILED", HeliumResultToString(HeliumResult::ERR_FAILED));
+ EXPECT_STREQ("ERR_CONNECTION_LOST",
+ HeliumResultToString(HeliumResult::ERR_CONNECTION_LOST));
+}
+
+} // namespace
+} // namespace blimp
+
« blimp/net/helium/helium_result.cc ('K') | « blimp/net/helium/helium_result.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698