OLD | NEW |
(Empty) | |
| 1 // Copyright 2014 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 "device/bluetooth/dbus/bluetooth_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 bluez { |
| 12 |
| 13 TEST(DBusClientBundleTest, UnstubFlagParser) { |
| 14 EXPECT_EQ(0, DBusClientBundle::ParseUnstubList("foo")); |
| 15 |
| 16 EXPECT_EQ(BluetoothDBusClientBundle::BLUETOOTH, |
| 17 DBusClientBundle::ParseUnstubList("BLUETOOTH")); |
| 18 |
| 19 EXPECT_EQ(BluetoothDBusClientBundle::BLUETOOTH, |
| 20 DBusClientBundle::ParseUnstubList("bluetooth")); |
| 21 |
| 22 EXPECT_EQ( |
| 23 DBusClientBundle::CRAS | DBusClientBundle::CROS_DISKS | |
| 24 DBusClientBundle::DEBUG_DAEMON | DBusClientBundle::SHILL, |
| 25 DBusClientBundle::ParseUnstubList("Cras,Cros_Disks,debug_daemon,Shill")); |
| 26 |
| 27 EXPECT_EQ(DBusClientBundle::CRAS | DBusClientBundle::CROS_DISKS | |
| 28 DBusClientBundle::DEBUG_DAEMON | DBusClientBundle::SHILL, |
| 29 DBusClientBundle::ParseUnstubList( |
| 30 "foo,Cras,Cros_Disks,debug_daemon,Shill")); |
| 31 } |
| 32 |
| 33 } // namespace bluez |
OLD | NEW |