From 98ae4a3d3ca74c8de31122951d54709b57faff08 Mon Sep 17 00:00:00 2001 From: "bryeung@chromium.org" Date: Fri, 27 Apr 2012 22:22:22 +0000 Subject: 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 --- .../browser/chromeos/bluetooth/bluetooth_utils_unittest.cc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'chrome/browser/chromeos/bluetooth/bluetooth_utils_unittest.cc') 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)); -- cgit v1.1