Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
shell
platform
windows
keyboard_utils_unittests.cc
Go to the documentation of this file.
1
// Copyright 2013 The Flutter 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
#include "flutter/shell/platform/windows/keyboard_utils.h"
5
6
#include "gtest/gtest.h"
7
8
namespace
flutter
{
9
namespace
testing {
10
11
TEST
(KeyboardWin32CommonTest,
EncodeUtf16
) {
12
std::u16string
result
;
13
14
result
=
EncodeUtf16
(0x24);
15
EXPECT_EQ(
result
.size(), 1);
16
EXPECT_EQ(
result
[0], 0x24);
17
18
result
=
EncodeUtf16
(0x20AC);
19
EXPECT_EQ(
result
.size(), 1);
20
EXPECT_EQ(
result
[0], 0x20AC);
21
22
result
=
EncodeUtf16
(0x10437);
23
EXPECT_EQ(
result
.size(), 2);
24
EXPECT_EQ(
result
[0], 0xD801);
25
EXPECT_EQ(
result
[1], 0xDC37);
26
27
result
=
EncodeUtf16
(0x24B62);
28
EXPECT_EQ(
result
.size(), 2);
29
EXPECT_EQ(
result
[0], 0xD852);
30
EXPECT_EQ(
result
[1], 0xDF62);
31
}
32
33
}
// namespace testing
34
}
// namespace flutter
TEST
#define TEST(S, s, D, expected)
Definition
FitsInTest.cpp:15
result
GAsyncResult * result
Definition
fl_text_input_plugin.cc:106
flutter
Definition
asset_manager.cc:10
flutter::EncodeUtf16
std::u16string EncodeUtf16(char32_t character)
Definition
keyboard_utils.cc:11
Generated on Fri Apr 26 2024 06:14:33 for Flutter Engine by
1.9.8