load("//tools/lint:lint.bzl", "add_lint_tests")
load(
    "//tools/skylark:drake_cc.bzl",
    "drake_cc_googletest",
    "drake_cc_library",
    "drake_cc_package_library",
)

package(default_visibility = ["//visibility:public"])

drake_cc_package_library(
    name = "test_utilities",
    testonly = 1,
    visibility = ["//visibility:public"],
    deps = [
        ":initialization_test_system",
        ":my_vector",
        ":pack_value",
        ":scalar_conversion",
    ],
)

drake_cc_library(
    name = "initialization_test_system",
    testonly = 1,
    srcs = [],
    hdrs = ["initialization_test_system.h"],
    deps = [
        "//systems/framework",
    ],
)

drake_cc_library(
    name = "pack_value",
    testonly = 1,
    srcs = [],
    hdrs = ["pack_value.h"],
    deps = [
        "//common:value",
    ],
)

drake_cc_library(
    name = "my_vector",
    testonly = 1,
    srcs = [],
    hdrs = ["my_vector.h"],
    deps = [
        "//common:essential",
        "//common:pointer_cast",
        "//systems/framework:vector",
    ],
)

drake_cc_library(
    name = "scalar_conversion",
    testonly = 1,
    srcs = [],
    hdrs = ["scalar_conversion.h"],
    deps = [
        "//common/test_utilities:is_dynamic_castable",
    ],
)

# === test/ ===

drake_cc_googletest(
    name = "my_vector_test",
    deps = [
        ":my_vector",
        "//common:copyable_unique_ptr",
        "//common:value",
        "//common/test_utilities:expect_throws_message",
        "//common/test_utilities:is_dynamic_castable",
    ],
)

add_lint_tests(enable_clang_format_lint = False)
