OLD | NEW |
---|---|
(Empty) | |
1 // Copyright (c) 2012 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 "chromeos/dbus/dbus_client_bundle.h" | |
6 | |
7 #include "base/basictypes.h" | |
8 #include "base/compiler_specific.h" | |
9 #include "testing/gtest/include/gtest/gtest.h" | |
10 | |
11 namespace chromeos { | |
12 | |
13 class DBusClientBundleTest : public testing::Test { | |
14 public: | |
15 DBusClientBundleTest() { | |
16 } | |
17 | |
18 private: | |
19 DISALLOW_COPY_AND_ASSIGN(DBusClientBundleTest); | |
20 }; | |
21 | |
22 TEST_F(DBusClientBundleTest, UnstubFlagParser) { | |
satorux1
2014/08/11 01:52:10
You can use TEST() and remove DBusClientBundleTest
zel
2014/08/12 17:32:32
Done.
| |
23 EXPECT_EQ(DBusClientBundle::ParseUnstubList("foo"), | |
24 DBusClientBundle::UNKNOWN); | |
25 | |
26 EXPECT_EQ(DBusClientBundle::ParseUnstubList("BLUETOOTH"), | |
27 DBusClientBundle::BLUETOOTH); | |
28 | |
29 EXPECT_EQ(DBusClientBundle::ParseUnstubList("bluetooth"), | |
30 DBusClientBundle::BLUETOOTH); | |
31 | |
32 EXPECT_EQ(DBusClientBundle::ParseUnstubList( | |
33 "Cras,CrosDisks,debugdaemon,Shill"), | |
34 DBusClientBundle::CRAS | | |
35 DBusClientBundle::CROS_DISKS | | |
36 DBusClientBundle::DEBUG_DAEMON | | |
37 DBusClientBundle::SHILL); | |
38 | |
39 EXPECT_EQ(DBusClientBundle::ParseUnstubList( | |
40 "foo,Cras,CrosDisks,debugdaemon,Shill"), | |
41 DBusClientBundle::CRAS | | |
42 DBusClientBundle::CROS_DISKS | | |
43 DBusClientBundle::DEBUG_DAEMON | | |
44 DBusClientBundle::SHILL); | |
45 } | |
46 | |
47 } // namespace chromeos | |
OLD | NEW |