Chromium Code Reviews| Index: chromeos/dbus/dbus_client_bundle_unittest.cc |
| diff --git a/chromeos/dbus/dbus_client_bundle_unittest.cc b/chromeos/dbus/dbus_client_bundle_unittest.cc |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..37aed55ac43ee5899b92584bc2da385a31f12c37 |
| --- /dev/null |
| +++ b/chromeos/dbus/dbus_client_bundle_unittest.cc |
| @@ -0,0 +1,38 @@ |
| +// Copyright (c) 2012 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 "chromeos/dbus/dbus_client_bundle.h" |
| + |
| +#include "base/basictypes.h" |
| +#include "base/compiler_specific.h" |
| +#include "testing/gtest/include/gtest/gtest.h" |
| + |
| +namespace chromeos { |
| + |
| +TEST(DBusClientBundleTest, UnstubFlagParser) { |
| + EXPECT_EQ(DBusClientBundle::ParseUnstubList("foo"), |
| + DBusClientBundle::UNKNOWN); |
|
satorux1
2014/08/13 01:09:20
per gtest.h, the expected value should come first.
zel
2014/08/13 01:36:02
Done.
|
| + |
| + EXPECT_EQ(DBusClientBundle::ParseUnstubList("BLUETOOTH"), |
| + DBusClientBundle::BLUETOOTH); |
| + |
| + EXPECT_EQ(DBusClientBundle::ParseUnstubList("bluetooth"), |
| + DBusClientBundle::BLUETOOTH); |
| + |
| + EXPECT_EQ(DBusClientBundle::ParseUnstubList( |
| + "Cras,CrosDisks,debugdaemon,Shill"), |
|
satorux1
2014/08/13 01:09:20
I'm confused. Why can "CrosDisks" be parsed, where
zel
2014/08/13 01:36:02
Yeah, this test should not pass :). Fixed.
|
| + DBusClientBundle::CRAS | |
| + DBusClientBundle::CROS_DISKS | |
| + DBusClientBundle::DEBUG_DAEMON | |
| + DBusClientBundle::SHILL); |
| + |
| + EXPECT_EQ(DBusClientBundle::ParseUnstubList( |
| + "foo,Cras,CrosDisks,debugdaemon,Shill"), |
| + DBusClientBundle::CRAS | |
| + DBusClientBundle::CROS_DISKS | |
| + DBusClientBundle::DEBUG_DAEMON | |
| + DBusClientBundle::SHILL); |
| +} |
| + |
| +} // namespace chromeos |