132a6e48fSopenharmony_ci# Copyright (c) 2023 Huawei Device Co., Ltd.
232a6e48fSopenharmony_ci# Licensed under the Apache License, Version 2.0 (the "License");
332a6e48fSopenharmony_ci# you may not use this file except in compliance with the License.
432a6e48fSopenharmony_ci# You may obtain a copy of the License at
532a6e48fSopenharmony_ci#
632a6e48fSopenharmony_ci#     http://www.apache.org/licenses/LICENSE-2.0
732a6e48fSopenharmony_ci#
832a6e48fSopenharmony_ci# Unless required by applicable law or agreed to in writing, software
932a6e48fSopenharmony_ci# distributed under the License is distributed on an "AS IS" BASIS,
1032a6e48fSopenharmony_ci# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1132a6e48fSopenharmony_ci# See the License for the specific language governing permissions and
1232a6e48fSopenharmony_ci# limitations under the License.
1332a6e48fSopenharmony_ci
1432a6e48fSopenharmony_ciimport("//build/test.gni")
1532a6e48fSopenharmony_ci
1632a6e48fSopenharmony_cimodule_out_path = "graphic_surface/utils"
1732a6e48fSopenharmony_ci
1832a6e48fSopenharmony_cigroup("unittest") {
1932a6e48fSopenharmony_ci  testonly = true
2032a6e48fSopenharmony_ci  deps = [ ":BufferHandleTest" ]
2132a6e48fSopenharmony_ci}
2232a6e48fSopenharmony_ci
2332a6e48fSopenharmony_ci## UnitTest buffer_handle_test {{{
2432a6e48fSopenharmony_ciohos_unittest("BufferHandleTest") {
2532a6e48fSopenharmony_ci  module_out_path = module_out_path
2632a6e48fSopenharmony_ci  sources = [ "buffer_handle_test.cpp" ]
2732a6e48fSopenharmony_ci  deps = [ ":buffer_handle_test_common" ]
2832a6e48fSopenharmony_ci  external_deps = [
2932a6e48fSopenharmony_ci    "c_utils:utils",
3032a6e48fSopenharmony_ci    "graphic_surface:buffer_handle",
3132a6e48fSopenharmony_ci    "hilog:libhilog",
3232a6e48fSopenharmony_ci    "ipc:ipc_core",
3332a6e48fSopenharmony_ci  ]
3432a6e48fSopenharmony_ci}
3532a6e48fSopenharmony_ci
3632a6e48fSopenharmony_ci## Build buffer_handle_test_common.a {{{
3732a6e48fSopenharmony_ciconfig("buffer_handle_test_config") {
3832a6e48fSopenharmony_ci  cflags = [
3932a6e48fSopenharmony_ci    "-Wall",
4032a6e48fSopenharmony_ci    "-Werror",
4132a6e48fSopenharmony_ci    "-g3",
4232a6e48fSopenharmony_ci    "-Dprivate=public",
4332a6e48fSopenharmony_ci    "-Dprotected=public",
4432a6e48fSopenharmony_ci  ]
4532a6e48fSopenharmony_ci}
4632a6e48fSopenharmony_ci
4732a6e48fSopenharmony_ci## UnitTest buffer_handle_test }}}
4832a6e48fSopenharmony_ci
4932a6e48fSopenharmony_ciohos_static_library("buffer_handle_test_common") {
5032a6e48fSopenharmony_ci  visibility = [ ":*" ]
5132a6e48fSopenharmony_ci  testonly = true
5232a6e48fSopenharmony_ci  public_configs = [ ":buffer_handle_test_config" ]
5332a6e48fSopenharmony_ci
5432a6e48fSopenharmony_ci  subsystem_name = "graphic"
5532a6e48fSopenharmony_ci  part_name = "graphic_surface"
5632a6e48fSopenharmony_ci}
5732a6e48fSopenharmony_ci## Build buffer_handle_test_common.a }}}
58