blob: 0c400c62ac55b351cd3119c495b55616be69f83a [file] [log] [blame]
# Copyright 2024 The Fuchsia Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# This target exist solely to ensure that the test file builds without error.
# It is never actually linked into anything or included in the IDK.
# To improve test coverage, the IDK builds it at both PLATFORM and supported
# API levels with different expected results based on a preprocessor define.
# It cannot be marked testonly for the reasons described in //sdk:fuchsia_idk_atoms.
static_library("availability_test") {
visibility = [ "//sdk/*" ]
if (override_target_api_level != "PLATFORM") {
# Define values used by the test.
# Due to the way the macros are defined, only literals can be specified.
# Therefore, separate literal values must be provided for relative levels.
_override_target_api_level_minus_one = override_target_api_level - 1
_override_target_api_level_plus_one = override_target_api_level + 1
# TODO( Replace the RHS with another mechanism.
_highest_supported_api_level_plus_one =
platform_version.in_development_api_level + 1
defines = [
sources = [ "availability_test.c" ]