Flutter Engine
Loading...
Searching...
No Matches
test_keyboard_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
5
#include <windows.h>
6
7
#include "
flutter/shell/platform/windows/testing/test_keyboard.h
"
8
#include "gtest/gtest.h"
9
10
namespace
flutter
{
11
namespace
testing {
12
13
TEST
(TestKeyboard, CloneString) {
14
const
char
* str1 =
"123"
;
15
char
* cloned_str1 =
clone_string
(str1);
16
EXPECT_STREQ(str1, cloned_str1);
17
EXPECT_NE(str1, cloned_str1);
18
delete
[] cloned_str1;
19
20
EXPECT_EQ(
clone_string
(
nullptr
),
nullptr
);
21
};
22
23
TEST
(TestKeyboard,
CreateKeyEventLparam
) {
24
EXPECT_EQ(
CreateKeyEventLparam
(0x1,
true
,
true
), 0xC1010001);
25
26
EXPECT_EQ(
CreateKeyEventLparam
(0x05,
false
,
false
, 0, 1, 0), 0x20050000);
27
};
28
29
}
// namespace testing
30
}
// namespace flutter
flutter::testing::TEST
TEST(NativeAssetsManagerTest, NoAvailableAssets)
Definition
native_assets_unittests.cc:68
flutter::testing::CreateKeyEventLparam
LPARAM CreateKeyEventLparam(USHORT scancode, bool extended, bool was_down, USHORT repeat_count, bool context_code, bool transition_state)
Definition
test_keyboard.cc:82
flutter::testing::clone_string
char * clone_string(const char *string)
Definition
test_keyboard.cc:16
flutter
Definition
asset_manager.cc:10
test_keyboard.h
shell
platform
windows
testing
test_keyboard_unittests.cc
Generated on Thu Nov 6 2025 16:11:28 for Flutter Engine by
1.9.8