diff options
Diffstat (limited to 'src/test/java/com/google/devtools/build')
-rw-r--r-- | src/test/java/com/google/devtools/build/lib/skylark/SkylarkRuleClassFunctionsTest.java | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/src/test/java/com/google/devtools/build/lib/skylark/SkylarkRuleClassFunctionsTest.java b/src/test/java/com/google/devtools/build/lib/skylark/SkylarkRuleClassFunctionsTest.java index 78ced6c804..0716654b14 100644 --- a/src/test/java/com/google/devtools/build/lib/skylark/SkylarkRuleClassFunctionsTest.java +++ b/src/test/java/com/google/devtools/build/lib/skylark/SkylarkRuleClassFunctionsTest.java @@ -375,13 +375,27 @@ public class SkylarkRuleClassFunctionsTest extends SkylarkTestCase { } @Test - public void testAttrCfg() throws Exception { + public void testAttrCfg_deprecated() throws Exception { Attribute attr = evalAttributeDefinition("attr.label(cfg = HOST_CFG, allow_files = True)") .build("a1"); assertEquals(ConfigurationTransition.HOST, attr.getConfigurationTransition()); } @Test + public void testAttrCfg() throws Exception { + Attribute attr = evalAttributeDefinition("attr.label(cfg = 'host', allow_files = True)") + .build("a1"); + assertEquals(ConfigurationTransition.HOST, attr.getConfigurationTransition()); + } + + @Test + public void testAttrCfgData() throws Exception { + Attribute attr = evalAttributeDefinition("attr.label(cfg = 'data', allow_files = True)") + .build("a1"); + assertEquals(ConfigurationTransition.DATA, attr.getConfigurationTransition()); + } + + @Test public void testAttrValues() throws Exception { Attribute attr = evalAttributeDefinition("attr.string(values = ['ab', 'cd'])").build("a1"); PredicateWithMessage<Object> predicate = attr.getAllowedValues(); |