Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(170)

Side by Side Diff: remoting/host/linux/unicode_to_keysym_unittest.cc

Issue 660703003: Convert ARRAYSIZE_UNSAFE -> arraysize in remoting/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | remoting/protocol/jingle_messages_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "remoting/host/linux/unicode_to_keysym.h" 5 #include "remoting/host/linux/unicode_to_keysym.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "testing/gtest/include/gtest/gtest.h" 10 #include "testing/gtest/include/gtest/gtest.h"
(...skipping 15 matching lines...) Expand all
26 { 0x318e, { 0x0ef7, 0x0100318e, 0 } }, 26 { 0x318e, { 0x0ef7, 0x0100318e, 0 } },
27 27
28 // Characters with 3 distinct keysyms. 28 // Characters with 3 distinct keysyms.
29 { 0x0030, { 0x0030, 0xffb0, 0x01000030, 0 } }, 29 { 0x0030, { 0x0030, 0xffb0, 0x01000030, 0 } },
30 { 0x005f, { 0x005f, 0x0bc6, 0x0100005f, 0 } }, 30 { 0x005f, { 0x005f, 0x0bc6, 0x0100005f, 0 } },
31 31
32 // Characters for which there are no regular keysyms. 32 // Characters for which there are no regular keysyms.
33 { 0x4444, { 0x01004444, 0 } }, 33 { 0x4444, { 0x01004444, 0 } },
34 }; 34 };
35 35
36 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(kTests); ++i) { 36 for (size_t i = 0; i < arraysize(kTests); ++i) {
37 std::vector<uint32_t> keysyms; 37 std::vector<uint32_t> keysyms;
38 GetKeySymsForUnicode(kTests[i].code_point, &keysyms); 38 GetKeySymsForUnicode(kTests[i].code_point, &keysyms);
39 39
40 std::vector<uint32_t> expected( 40 std::vector<uint32_t> expected(
41 kTests[i].expected_keysyms, 41 kTests[i].expected_keysyms,
42 std::find( 42 std::find(
43 kTests[i].expected_keysyms, kTests[i].expected_keysyms + 4, 0)); 43 kTests[i].expected_keysyms, kTests[i].expected_keysyms + 4, 0));
44 EXPECT_EQ(expected, keysyms); 44 EXPECT_EQ(expected, keysyms);
45 } 45 }
46 } 46 }
47 47
48 } // namespace remoting 48 } // namespace remoting
OLDNEW
« no previous file with comments | « no previous file | remoting/protocol/jingle_messages_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698