1# Copyright (c) 2024 Huawei Device Co., Ltd. 2# Licensed under the Apache License, Version 2.0 (the "License"); 3# you may not use this file except in compliance with the License. 4# You may obtain a copy of the License at 5# 6# http://www.apache.org/licenses/LICENSE-2.0 7# 8# Unless required by applicable law or agreed to in writing, software 9# distributed under the License is distributed on an "AS IS" BASIS, 10# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11# See the License for the specific language governing permissions and 12# limitations under the License. 13 14import("../../test.gni") 15 16module_output_path = "previewer/mock" 17 18group("mock_unittest") { 19 testonly = true 20 deps = [ ":mock_rich_test" ] 21} 22 23ide_unittest("mock_rich_test") { 24 testonly = true 25 part_name = "previewer" 26 subsystem_name = "ide" 27 module_out_path = module_output_path 28 output_name = "mock_rich" 29 sources = [ 30 "$graphic_2d_path/rosen/modules/platform/utils/refbase.cpp", 31 "$ide_previewer_path/cli/CommandLine.cpp", 32 "$ide_previewer_path/cli/CommandLineFactory.cpp", 33 "$ide_previewer_path/cli/CommandLineInterface.cpp", 34 "$ide_previewer_path/mock/KeyInput.cpp", 35 "$ide_previewer_path/mock/LanguageManager.cpp", 36 "$ide_previewer_path/mock/MouseInput.cpp", 37 "$ide_previewer_path/mock/MouseWheel.cpp", 38 "$ide_previewer_path/mock/VirtualMessage.cpp", 39 "$ide_previewer_path/mock/VirtualScreen.cpp", 40 "$ide_previewer_path/mock/rich/KeyInputImpl.cpp", 41 "$ide_previewer_path/mock/rich/LanguageManagerImpl.cpp", 42 "$ide_previewer_path/mock/rich/MouseInputImpl.cpp", 43 "$ide_previewer_path/mock/rich/MouseWheelImpl.cpp", 44 "$ide_previewer_path/mock/rich/VirtualMessageImpl.cpp", 45 "$ide_previewer_path/mock/rich/VirtualScreenImpl.cpp", 46 "$ide_previewer_path/test/mock/MockGlobalResult.cpp", 47 "$ide_previewer_path/test/mock/ability/MockSimulator.cpp", 48 "$ide_previewer_path/test/mock/arkui/MockAceAbility.cpp", 49 "$ide_previewer_path/test/mock/arkui/MockAcePreviewHelper.cpp", 50 "$ide_previewer_path/test/mock/graphic/MockGlfwRenderContext.cpp", 51 "$ide_previewer_path/test/mock/jsapp/MockJsApp.cpp", 52 "$ide_previewer_path/test/mock/jsapp/MockJsAppImpl.cpp", 53 "$ide_previewer_path/test/mock/util/MockClipboardHelper.cpp", 54 "$ide_previewer_path/test/mock/util/MockKeyboardHelper.cpp", 55 "$ide_previewer_path/test/mock/util/MockLocalSocket.cpp", 56 "$ide_previewer_path/test/mock/util/MockWebSocketServer.cpp", 57 "$ide_previewer_path/util/CallbackQueue.cpp", 58 "$ide_previewer_path/util/CommandParser.cpp", 59 "$ide_previewer_path/util/CppTimer.cpp", 60 "$ide_previewer_path/util/CppTimerManager.cpp", 61 "$ide_previewer_path/util/EndianUtil.cpp", 62 "$ide_previewer_path/util/FileSystem.cpp", 63 "$ide_previewer_path/util/Interrupter.cpp", 64 "$ide_previewer_path/util/JsonReader.cpp", 65 "$ide_previewer_path/util/PreviewerEngineLog.cpp", 66 "$ide_previewer_path/util/SharedDataManager.cpp", 67 "$ide_previewer_path/util/TimeTool.cpp", 68 "$ide_previewer_path/util/TraceTool.cpp", 69 "$ide_previewer_path/util/unix/LocalDate.cpp", 70 "$ide_previewer_path/util/unix/NativeFileSystem.cpp", 71 "KeyInputImplTest.cpp", 72 "LanguageManagerImplTest.cpp", 73 "MouseInputImplTest.cpp", 74 "MouseWheelImplTest.cpp", 75 "VirtualScreenImplTest.cpp", 76 ] 77 include_dirs = [ 78 "$ide_previewer_path/cli", 79 "$ide_previewer_path/util", 80 "//third_party/libwebsockets/include", 81 "//third_party/cJSON", 82 "//third_party/bounds_checking_function/include", 83 "//third_party/libjpeg-turbo/libjpeg-turbo-2.1.1", 84 ] 85 include_dirs += graphic_2d_include_path 86 include_dirs += window_manager_include_path 87 include_dirs += ability_runtime_include_path 88 include_dirs += ace_engine_include_path 89 include_dirs += [ 90 "$ide_previewer_path/test/mock", 91 "$ide_previewer_path/jsapp", 92 "$ide_previewer_path/jsapp/rich", 93 "$ide_previewer_path/mock", 94 "$ide_previewer_path/mock/rich", 95 ] 96 deps = [ 97 "//third_party/bounds_checking_function:libsec_static", 98 "//third_party/cJSON:cjson_static", 99 "//third_party/libjpeg-turbo:turbojpeg_static", 100 ] 101 libs = [ "X11" ] 102 cflags = [ "-Wno-error=overflow" ] 103 cflags_cc = [ "-Wno-error=overflow" ] 104 ldflags = [ "-Wno-error=overflow" ] 105} 106