aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/test/java/com/google/devtools/build/docgen/RuleDocumentationTest.java
diff options
context:
space:
mode:
authorGravatar David Chen <dzc@google.com>2016-02-24 22:17:42 +0000
committerGravatar Philipp Wollermann <philwo@google.com>2016-02-25 14:13:22 +0000
commitac13e22630ef3bd6cc67cda14633f976b5ffc044 (patch)
tree70d0ff60ab00b93128ec73fdcf495c72b6898115 /src/test/java/com/google/devtools/build/docgen/RuleDocumentationTest.java
parent6e30521e0d230ba8138cb8bbe3bf3f4fb4fbfa60 (diff)
Add syntax for referencing docs in other rule families.
This CL implements a new `${link rule.attribute}` syntax which can be used to reference the documentation of rules and attributes of other rule families. For example, `${link cc_library.deps}` will generate a link to the documentation for the `deps` attribute of the `cc_library` rule. Similarly, this syntax can also be used to reference sections of static documentation, for example `${link common-definitions.label-expansion}`. -- MOS_MIGRATED_REVID=115492361
Diffstat (limited to 'src/test/java/com/google/devtools/build/docgen/RuleDocumentationTest.java')
-rw-r--r--src/test/java/com/google/devtools/build/docgen/RuleDocumentationTest.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/test/java/com/google/devtools/build/docgen/RuleDocumentationTest.java b/src/test/java/com/google/devtools/build/docgen/RuleDocumentationTest.java
index d77c9eaabc..d7c6f6c4bc 100644
--- a/src/test/java/com/google/devtools/build/docgen/RuleDocumentationTest.java
+++ b/src/test/java/com/google/devtools/build/docgen/RuleDocumentationTest.java
@@ -81,7 +81,7 @@ public class RuleDocumentationTest {
@Test
public void testInheritedAttributeGeneratesSignature() throws Exception {
RuleDocumentationAttribute runtimeDepsAttr = RuleDocumentationAttribute.create(TestRule.class,
- "runtime_deps", "attribute doc", 0, NO_FLAGS);
+ "runtime_deps", "attribute doc", 0, "", NO_FLAGS);
checkAttributeForRule(
new RuleDocumentation(
"java_binary", "BINARY", "JAVA", "", 0, "", ImmutableSet.<String>of(), provider),
@@ -111,7 +111,7 @@ public class RuleDocumentationTest {
0, "", ImmutableSet.<String>of(), provider);
ruleDoc.addDocVariable("VAR", "w");
RuleDocumentationAttribute attributeDoc = RuleDocumentationAttribute.create(TestRule.class,
- "srcs", "attribute doc", 0, NO_FLAGS);
+ "srcs", "attribute doc", 0, "", NO_FLAGS);
ruleDoc.addAttribute(attributeDoc);
assertEquals("\nx\ny\nz\n\n", ruleDoc.getCommandLineDocumentation());
}