diff options
author | bryeung@chromium.org <bryeung@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-04-27 22:22:22 +0000 |
---|---|---|
committer | bryeung@chromium.org <bryeung@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-04-27 22:22:22 +0000 |
commit | 98ae4a3d3ca74c8de31122951d54709b57faff08 (patch) | |
tree | 4346fb444da4448154cd0de40aceca9edd743167 /chrome/browser/chromeos/bluetooth/bluetooth_utils_unittest.cc | |
parent | 66a7c0cd84eb5303ba95f4be9f633b31b1cf4722 (diff) | |
download | chromium_src-98ae4a3d3ca74c8de31122951d54709b57faff08.zip chromium_src-98ae4a3d3ca74c8de31122951d54709b57faff08.tar.gz chromium_src-98ae4a3d3ca74c8de31122951d54709b57faff08.tar.bz2 |
Fix the semantics of str2ba.
This was originally written to correspond to strtoba, which places the
pairs of bytes in the wrong order for calls to connect().
TEST=updated unit test
BUG=none
Review URL: http://codereview.chromium.org/10253013
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@134373 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/chromeos/bluetooth/bluetooth_utils_unittest.cc')
-rw-r--r-- | chrome/browser/chromeos/bluetooth/bluetooth_utils_unittest.cc | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/chrome/browser/chromeos/bluetooth/bluetooth_utils_unittest.cc b/chrome/browser/chromeos/bluetooth/bluetooth_utils_unittest.cc index 4c04035..65c203e 100644 --- a/chrome/browser/chromeos/bluetooth/bluetooth_utils_unittest.cc +++ b/chrome/browser/chromeos/bluetooth/bluetooth_utils_unittest.cc @@ -14,12 +14,12 @@ TEST(BluetoothUtilsTest, str2ba) { bdaddr_t bluetooth_address; EXPECT_TRUE(bluetooth_utils::str2ba("01:02:03:0A:10:A0", &bluetooth_address)); - EXPECT_EQ(1, bluetooth_address.b[0]); - EXPECT_EQ(2, bluetooth_address.b[1]); - EXPECT_EQ(3, bluetooth_address.b[2]); - EXPECT_EQ(10, bluetooth_address.b[3]); - EXPECT_EQ(16, bluetooth_address.b[4]); - EXPECT_EQ(160, bluetooth_address.b[5]); + EXPECT_EQ(1, bluetooth_address.b[5]); + EXPECT_EQ(2, bluetooth_address.b[4]); + EXPECT_EQ(3, bluetooth_address.b[3]); + EXPECT_EQ(10, bluetooth_address.b[2]); + EXPECT_EQ(16, bluetooth_address.b[1]); + EXPECT_EQ(160, bluetooth_address.b[0]); EXPECT_FALSE(bluetooth_utils::str2ba("obviously wrong", &bluetooth_address)); EXPECT_FALSE(bluetooth_utils::str2ba("00:00", &bluetooth_address)); |