# Copyright (c) 2023 Huawei Device Co., Ltd.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

import("//foundation/arkui/ace_engine/test/unittest/ace_unittest.gni")

ace_unittest("geometry_test") {
  module_name = "Animation-Animatable"
  type = "new"
  sources = [
    "animatable_dimension_test.cpp",
    "animatable_matrix4_test.cpp",
    "container_test.cpp",
    "dimension_test.cpp",
    "least_square_impl_test.cpp",
    "matrix3_test.cpp",
    "matrix4_test.cpp",
    "quaternion_test.cpp",
    "size_t_test.cpp",
    "subwindow_manager_test.cpp",
    "transform_util_test.cpp",
  ]

  if (!ace_enable_full_test_suite) {
    sources = []
    sources = [
      "base_test_core.cpp",
      "base_test_min.cpp",
    ]
  } else {
    sources += [
      "base_test_core.cpp",
      "base_test_min.cpp",
    ]
  }
}

ace_unittest("util_test") {
  module_name = "CommonEvent-Input"
  type = "new"
  sources = [
    "base_utils_test.cpp",
    "delay_task_test.cpp",
    "dump_recorder_test.cpp",
    "json_util_test.cpp",
    "measure_util_test.cpp",
    "node_object_test.cpp",
    "unique_valued_map_test.cpp",
    "uobject_test.cpp",
    "utf_helper_test_ng.cpp",
    "utf_helper_testone_ng.cpp",
    "utf_test.cpp",
  ]

  if (!ace_enable_full_test_suite) {
    sources = []
    sources = [ "base_test_min.cpp" ]
  } else {
    sources += [ "base_test_min.cpp" ]
  }

  external_deps = [
    "bounds_checking_function:libsec_static",
    "icu:static_icui18n",
    "icu:static_icuuc",
  ]
}

group("base_unittest") {
  testonly = true
  deps = [
    ":geometry_test",
    ":util_test",
  ]
}