From 3e485ec15ea669fd7149016e36132a5ccfd92056 Mon Sep 17 00:00:00 2001 From: Chris Bracken Date: Wed, 3 Aug 2022 20:26:44 +0100 Subject: [PATCH] [Windows] Add missing testing namespace (flutter/engine#35131) flutter_windows_unittests.cc had its tests inside the flutter namespace rather than the flutter:testing namespace. This adds the missing namespace and makes one namespace-related cleanup in one of the key event unit tests as well. This is a post-landing cleanup for PR: https://github.com/flutter/engine/pull/35106 Issue: https://github.com/flutter/flutter/issues/86617 --- .../shell/platform/windows/flutter_windows_unittests.cc | 2 ++ .../windows/keyboard_key_embedder_handler_unittests.cc | 9 +++------ 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/engine/src/flutter/shell/platform/windows/flutter_windows_unittests.cc b/engine/src/flutter/shell/platform/windows/flutter_windows_unittests.cc index e0b87dd7812..52676d3fd7f 100644 --- a/engine/src/flutter/shell/platform/windows/flutter_windows_unittests.cc +++ b/engine/src/flutter/shell/platform/windows/flutter_windows_unittests.cc @@ -9,6 +9,7 @@ #include "gtest/gtest.h" namespace flutter { +namespace testing { TEST(FlutterWindowsTest, GetTextureRegistrar) { FlutterDesktopEngineProperties properties; @@ -22,4 +23,5 @@ TEST(FlutterWindowsTest, GetTextureRegistrar) { FlutterDesktopEngineDestroy(engine); } +} // namespace testing } // namespace flutter diff --git a/engine/src/flutter/shell/platform/windows/keyboard_key_embedder_handler_unittests.cc b/engine/src/flutter/shell/platform/windows/keyboard_key_embedder_handler_unittests.cc index aee316a4e16..3c526d9ba65 100644 --- a/engine/src/flutter/shell/platform/windows/keyboard_key_embedder_handler_unittests.cc +++ b/engine/src/flutter/shell/platform/windows/keyboard_key_embedder_handler_unittests.cc @@ -14,6 +14,7 @@ #include "gtest/gtest.h" namespace flutter { +namespace testing { namespace { @@ -71,11 +72,6 @@ UINT DefaultMapVkToScan(UINT virtual_key, bool extended) { extended ? MAPVK_VK_TO_VSC_EX : MAPVK_VK_TO_VSC); } -} // namespace - -namespace testing { - -namespace { constexpr uint64_t kScanCodeKeyA = 0x1e; constexpr uint64_t kScanCodeAltLeft = 0x38; constexpr uint64_t kScanCodeNumpad1 = 0x4f; @@ -86,9 +82,10 @@ constexpr uint64_t kScanCodeShiftRight = 0x36; constexpr uint64_t kVirtualKeyA = 0x41; -using namespace ::flutter::testing::keycodes; } // namespace +using namespace ::flutter::testing::keycodes; + TEST(KeyboardKeyEmbedderHandlerTest, ConvertChar32ToUtf8) { std::string result;