Open glencoe opened 5 years ago
The use of macros is discouraged since macros are expanded before the loading phase. This makes debugging more difficult. Create a mock rule, that returns a provider similar to the filegroup rule to allow usage as follows.
mock( name = "MyMock", hdr = "include/header.h", library = ["//:LibProvidingHeader"] ) mock( name = "OtherMock", hdr = "package_relative_path_to_hdr.h" ) cc_test( name = "Test", srcs = [":MyMock", ":OtherMock", "Test.c"], deps = ["//:LibContainingCodeUnderTest"] )
The use of macros is discouraged since macros are expanded before the loading phase. This makes debugging more difficult. Create a mock rule, that returns a provider similar to the filegroup rule to allow usage as follows.