package(default_visibility = ["//visibility:public"]) load("@rules_cc//cc:defs.bzl", "cc_test") cc_test( name = "tutorial_test", srcs = ["t_tutorial.cxx"], deps = ["@nlopt//:nlopt"], size = "small", ) cc_test( name = "testopt_test", srcs = [ "testopt.c", "testfuncs.c", "testfuncs.h", ], copts = select({ "@platforms//os:windows": [ "/D_CRT_SECURE_NO_WARNINGS", ], "//conditions:default": [ "-Wno-unused-parameter", "-Wno-unused-variable", ], }), deps = ["@nlopt//:nlopt"], args = [ "-a", "11", # NLOPT_LD_LBFGS algorithm "0", # Test function 0 ], size = "medium", ) cc_test( name = "box_test", srcs = ["box.c"], copts = select({ "@platforms//os:windows": [ "/D_CRT_SECURE_NO_WARNINGS", ], "//conditions:default": [ "-Wno-unused-parameter", "-Wno-deprecated-declarations", "-Wno-unused-variable", ], }), deps = ["@nlopt//:nlopt"], size = "small", ) cc_test( name = "lorentzfit_test", srcs = ["lorentzfit.c"], copts = select({ "@platforms//os:windows": [ "/D_CRT_SECURE_NO_WARNINGS", ], "//conditions:default": [ "-Wno-unused-parameter", "-Wno-deprecated-declarations", "-Wno-unused-variable", ], }), deps = ["@nlopt//:nlopt"], size = "small", ) test_suite( name = "all_tests", tests = [ ":tutorial_test", ":box_test", ":lorentzfit_test", # Note: testopt_test excluded from suite as it requires specific args ], )