summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/unittests/clang-doc/SerializeTest.cpp
diff options
context:
space:
mode:
authorDiego Astiazaran <diegoaat97@gmail.com>2019-08-12 18:42:46 +0000
committerDiego Astiazaran <diegoaat97@gmail.com>2019-08-12 18:42:46 +0000
commite27f778a1992177cdd19130a7148dab9e343b747 (patch)
tree8945e3e998ed450a2e4c47cb4a659e9e526f8055 /clang-tools-extra/unittests/clang-doc/SerializeTest.cpp
parentc9f476a503b5a8b053475ee6ae125814fd928342 (diff)
downloadbcm5719-llvm-e27f778a1992177cdd19130a7148dab9e343b747.tar.gz
bcm5719-llvm-e27f778a1992177cdd19130a7148dab9e343b747.zip
[clang-doc] Generate HTML links for children namespaces/records
Path is now stored in the references to the child while serializing, then this path is used to generate the relative path in the HTML generator. Now some references have paths and some don't so in the reducing phase, references are now properly merged checking for empty attributes. Tests added for HTML and YAML generators, merging and serializing. computeRelativePath function had a bug when the filepath is part of the given directory; it returned a path that starts with a separator. This has been fixed. Differential Revision: https://reviews.llvm.org/D65987 llvm-svn: 368602
Diffstat (limited to 'clang-tools-extra/unittests/clang-doc/SerializeTest.cpp')
-rw-r--r--clang-tools-extra/unittests/clang-doc/SerializeTest.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/clang-tools-extra/unittests/clang-doc/SerializeTest.cpp b/clang-tools-extra/unittests/clang-doc/SerializeTest.cpp
index dff12d2bc5a..f9feaf9e074 100644
--- a/clang-tools-extra/unittests/clang-doc/SerializeTest.cpp
+++ b/clang-tools-extra/unittests/clang-doc/SerializeTest.cpp
@@ -407,12 +407,14 @@ TEST(SerializeTest, emitChildRecords) {
RecordInfo *ParentB = InfoAsRecord(Infos[3].get());
RecordInfo ExpectedParentB(EmptySID);
- ExpectedParentB.ChildRecords.emplace_back(EmptySID, "B", InfoType::IT_record);
+ ExpectedParentB.ChildRecords.emplace_back(EmptySID, "B", InfoType::IT_record,
+ "A");
CheckRecordInfo(&ExpectedParentB, ParentB);
NamespaceInfo *ParentC = InfoAsNamespace(Infos[7].get());
NamespaceInfo ExpectedParentC(EmptySID);
- ExpectedParentC.ChildRecords.emplace_back(EmptySID, "C", InfoType::IT_record);
+ ExpectedParentC.ChildRecords.emplace_back(EmptySID, "C", InfoType::IT_record,
+ "@nonymous_namespace");
CheckNamespaceInfo(&ExpectedParentC, ParentC);
}
@@ -431,7 +433,7 @@ TEST(SerializeTest, emitChildNamespaces) {
NamespaceInfo *ParentB = InfoAsNamespace(Infos[3].get());
NamespaceInfo ExpectedParentB(EmptySID);
ExpectedParentB.ChildNamespaces.emplace_back(EmptySID, "B",
- InfoType::IT_namespace);
+ InfoType::IT_namespace, "A");
CheckNamespaceInfo(&ExpectedParentB, ParentB);
}
OpenPOWER on IntegriCloud