xref: /aosp_15_r20/external/stardoc/test/testdata/namespace_test/input.bzl (revision b2fa42943c124aa9c7163734493fc7a7559681cf)
1"""A test that verifies documenting a namespace of functions."""
2
3def _min(integers):
4    """Returns the minimum of given elements.
5
6    Args:
7      integers: A list of integers. Must not be empty.
8
9    Returns:
10      The minimum integer in the given list.
11    """
12    _ignore = [integers]  # @unused
13    return 42
14
15def _assert_non_empty(some_list, other_list):
16    """Asserts the two given lists are not empty.
17
18    Args:
19      some_list: The first list
20      other_list: The second list
21    """
22    _ignore = [some_list, other_list]  # @unused
23    fail("Not implemented")
24
25def _join_strings(strings, delimiter = ", "):
26    """Joins the given strings with a delimiter.
27
28    Args:
29      strings: A list of strings to join.
30      delimiter: The delimiter to use
31
32    Returns:
33      The joined string.
34    """
35    _ignore = [strings, delimiter]  # @unused
36    return ""
37
38my_namespace = struct(
39    dropped_field = "Note this field should not be documented",
40    assert_non_empty = _assert_non_empty,
41    min = _min,
42    join_strings = _join_strings,
43)
44