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

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

Issue 2385913002: Define canonical enum for "HeliumResult" status values. (Closed)
Patch Set: the android compiler is dumb Created 4 years, 2 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..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
« 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