diff options
author | plf <plf@google.com> | 2018-04-06 05:20:24 -0700 |
---|---|---|
committer | Copybara-Service <copybara-piper@google.com> | 2018-04-06 05:21:38 -0700 |
commit | aa3d37688f17435174156827a4beb4e1e5b0678a (patch) | |
tree | 849d2c6796a53a9a6cf9672e8bb31a12d777eebb /src/test/java/com/google/devtools/build/lib/rules/cpp/CcLibraryConfiguredTargetTest.java | |
parent | 16198bf1f795af34bd72f751cc272c0ecc97f9e0 (diff) |
C++: Introduce provider that wraps C++ compilation providers.
For now, only CcCompilationContextInfo is wrapped. CcCompilationContextInfo will be renamed CcCompilationContext since the *Info suffix is used for providers. This will be done in a follow-up CL.
RELNOTES:none
PiperOrigin-RevId: 191876504
Diffstat (limited to 'src/test/java/com/google/devtools/build/lib/rules/cpp/CcLibraryConfiguredTargetTest.java')
-rw-r--r-- | src/test/java/com/google/devtools/build/lib/rules/cpp/CcLibraryConfiguredTargetTest.java | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/test/java/com/google/devtools/build/lib/rules/cpp/CcLibraryConfiguredTargetTest.java b/src/test/java/com/google/devtools/build/lib/rules/cpp/CcLibraryConfiguredTargetTest.java index e5c21e7a89..c10d2c4e91 100644 --- a/src/test/java/com/google/devtools/build/lib/rules/cpp/CcLibraryConfiguredTargetTest.java +++ b/src/test/java/com/google/devtools/build/lib/rules/cpp/CcLibraryConfiguredTargetTest.java @@ -90,13 +90,16 @@ public class CcLibraryConfiguredTargetTest extends BuildViewTestCase { private CppModuleMapAction getCppModuleMapAction(String label) throws Exception { ConfiguredTarget target = getConfiguredTarget(label); - CppModuleMap cppModuleMap = target.get(CcCompilationContextInfo.PROVIDER).getCppModuleMap(); + CppModuleMap cppModuleMap = + target.get(CcCompilationInfo.PROVIDER).getCcCompilationContextInfo().getCppModuleMap(); return (CppModuleMapAction) getGeneratingAction(cppModuleMap.getArtifact()); } private void assertNoCppModuleMapAction(String label) throws Exception { ConfiguredTarget target = getConfiguredTarget(label); - assertThat(target.get(CcCompilationContextInfo.PROVIDER).getCppModuleMap()).isNull(); + assertThat( + target.get(CcCompilationInfo.PROVIDER).getCcCompilationContextInfo().getCppModuleMap()) + .isNull(); } @Test @@ -104,7 +107,8 @@ public class CcLibraryConfiguredTargetTest extends BuildViewTestCase { ConfiguredTarget l = scratchConfiguredTarget("a", "l", "cc_library(name='l', srcs=['l.cc'], defines=['V=$(FOO)'], toolchains=[':v'])", "make_variable_tester(name='v', variables={'FOO': 'BAR'})"); - assertThat(l.get(CcCompilationContextInfo.PROVIDER).getDefines()).contains("V=BAR"); + assertThat(l.get(CcCompilationInfo.PROVIDER).getCcCompilationContextInfo().getDefines()) + .contains("V=BAR"); } @Test |