aboutsummaryrefslogtreecommitdiff
path: root/clang-tools-extra/unittests/clang-doc/JSONGeneratorTest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang-tools-extra/unittests/clang-doc/JSONGeneratorTest.cpp')
-rw-r--r--clang-tools-extra/unittests/clang-doc/JSONGeneratorTest.cpp25
1 files changed, 25 insertions, 0 deletions
diff --git a/clang-tools-extra/unittests/clang-doc/JSONGeneratorTest.cpp b/clang-tools-extra/unittests/clang-doc/JSONGeneratorTest.cpp
index 5927235b..07c761f 100644
--- a/clang-tools-extra/unittests/clang-doc/JSONGeneratorTest.cpp
+++ b/clang-tools-extra/unittests/clang-doc/JSONGeneratorTest.cpp
@@ -63,7 +63,11 @@ TEST(JSONGeneratorTest, emitRecordJSON) {
"Bases": [
{
"Access": "public",
+ "End": true,
"FullName": "",
+ "HasPublicFunctions": true,
+ "HasPublicMembers": true,
+ "InfoType": "record",
"IsParent": true,
"IsTypedef": false,
"IsVirtual": true,
@@ -72,6 +76,7 @@ TEST(JSONGeneratorTest, emitRecordJSON) {
"Path": "path/to/F",
"PublicFunctions": [
{
+ "InfoType": "function",
"IsStatic": false,
"Name": "InheritedFunctionOne",
"ReturnType": {
@@ -96,8 +101,11 @@ TEST(JSONGeneratorTest, emitRecordJSON) {
],
"Enums": [
{
+ "End": true,
+ "InfoType": "enum",
"Members": [
{
+ "End": true,
"Name": "RED",
"Value": "0"
}
@@ -108,6 +116,10 @@ TEST(JSONGeneratorTest, emitRecordJSON) {
}
],
"FullName": "",
+ "HasEnums": true,
+ "HasPublicFunctions": true,
+ "HasRecords": true,
+ "InfoType": "record",
"IsTypedef": false,
"Location": {
"Filename": "main.cpp",
@@ -120,6 +132,7 @@ TEST(JSONGeneratorTest, emitRecordJSON) {
],
"Parents": [
{
+ "End": true,
"Name": "F",
"Path": "",
"QualName": "",
@@ -135,6 +148,7 @@ TEST(JSONGeneratorTest, emitRecordJSON) {
],
"PublicFunctions": [
{
+ "InfoType": "function",
"IsStatic": false,
"Name": "OneFunction",
"ReturnType": {
@@ -149,6 +163,7 @@ TEST(JSONGeneratorTest, emitRecordJSON) {
],
"Records": [
{
+ "End": true,
"Name": "ChildStruct",
"Path": "path/to/A/r",
"QualName": "path::to::A::r::ChildStruct",
@@ -164,6 +179,7 @@ TEST(JSONGeneratorTest, emitRecordJSON) {
"USR": "0000000000000000000000000000000000000000",
"VirtualParents": [
{
+ "End": true,
"Name": "G",
"Path": "path/to/G",
"QualName": "path::to::G::G",
@@ -201,6 +217,8 @@ TEST(JSONGeneratorTest, emitNamespaceJSON) {
std::string Expected = R"raw({
"Enums": [
{
+ "End": true,
+ "InfoType": "enum",
"Name": "OneEnum",
"Scoped": false,
"USR": "0000000000000000000000000000000000000000"
@@ -208,6 +226,8 @@ TEST(JSONGeneratorTest, emitNamespaceJSON) {
],
"Functions": [
{
+ "End": true,
+ "InfoType": "function",
"IsStatic": false,
"Name": "OneFunction",
"ReturnType": {
@@ -220,12 +240,16 @@ TEST(JSONGeneratorTest, emitNamespaceJSON) {
"USR": "0000000000000000000000000000000000000000"
}
],
+ "HasEnums": true,
+ "HasRecords": true,
+ "InfoType": "namespace",
"Name": "Namespace",
"Namespace": [
"A"
],
"Namespaces": [
{
+ "End": true,
"Name": "ChildNamespace",
"Path": "path/to/A/Namespace",
"QualName": "path::to::A::Namespace::ChildNamespace",
@@ -235,6 +259,7 @@ TEST(JSONGeneratorTest, emitNamespaceJSON) {
"Path": "path/to/A",
"Records": [
{
+ "End": true,
"Name": "ChildStruct",
"Path": "path/to/A/Namespace",
"QualName": "path::to::A::Namespace::ChildStruct",