Browse Source

update test

pull/2/head
Jacob Dufault 8 years ago
parent
commit
94b344dbe3
  1. 6
      serializer.cc
  2. 8
      tests/_empty_test.cc
  3. 6
      tests/class_forward_declaration.cc
  4. 6
      tests/constructors/constructor.cc
  5. 6
      tests/constructors/destructor.cc
  6. 7
      tests/constructors/invalid_reference.cc
  7. 6
      tests/declaration_vs_definition/class.cc
  8. 5
      tests/declaration_vs_definition/class_member.cc
  9. 5
      tests/declaration_vs_definition/class_member_static.cc
  10. 7
      tests/declaration_vs_definition/func.cc
  11. 6
      tests/declaration_vs_definition/method.cc
  12. 5
      tests/enums/enum_class_decl.cc
  13. 5
      tests/enums/enum_decl.cc
  14. 5
      tests/enums/enum_inherit.cc
  15. 5
      tests/enums/enum_usage.cc
  16. 5
      tests/foobar.cc
  17. 7
      tests/function_declaration.cc
  18. 7
      tests/function_declaration_definition.cc
  19. 7
      tests/function_definition.cc
  20. 7
      tests/method_declaration.cc
  21. 7
      tests/method_definition.cc
  22. 7
      tests/method_inline_declaration.cc
  23. 8
      tests/namespaces/anonymous_function.cc
  24. 8
      tests/namespaces/function_declaration.cc
  25. 8
      tests/namespaces/function_definition.cc
  26. 7
      tests/namespaces/method_declaration.cc
  27. 6
      tests/namespaces/method_definition.cc
  28. 5
      tests/namespaces/method_inline_declaration.cc
  29. 3
      tests/namespaces/namespace_reference.cc
  30. 8
      tests/stl.cc
  31. 7
      tests/templates/func_specialized_template_param.cc
  32. 5
      tests/templates/implicit_variable_instantiation.cc
  33. 6
      tests/templates/namespace_template_class_template_func_usage_folded_into_one.cc
  34. 6
      tests/templates/namespace_template_type_usage_folded_into_one.cc
  35. 7
      tests/templates/specialized_func_definition.cc
  36. 6
      tests/templates/template_class_func_usage_folded_into_one.cc
  37. 6
      tests/templates/template_class_template_func_usage_folded_into_one.cc
  38. 5
      tests/templates/template_class_type_usage_folded_into_one.cc
  39. 5
      tests/templates/template_class_var_usage_folded_into_one.cc
  40. 6
      tests/templates/template_func_usage_folded_into_one.cc
  41. 5
      tests/templates/template_type_usage_folded_into_one.cc
  42. 5
      tests/templates/template_var_usage_folded_into_one.cc

6
serializer.cc

@ -168,9 +168,9 @@ bool ReflectMemberStart(Writer& visitor, IndexedFile& value) {
template<typename TVisitor>
void Reflect(TVisitor& visitor, IndexedFile& value) {
REFLECT_MEMBER_START();
REFLECT_MEMBER2("types", value.types);
REFLECT_MEMBER2("functions", value.funcs);
REFLECT_MEMBER2("variables", value.vars);
REFLECT_MEMBER(types);
REFLECT_MEMBER(funcs);
REFLECT_MEMBER(vars);
REFLECT_MEMBER_END();
}

8
tests/_empty_test.cc

@ -1,8 +1,4 @@
/*
OUTPUT:
{
"types": [],
"functions": [],
"variables": []
}
*/
{}
*/

6
tests/class_forward_declaration.cc

@ -13,8 +13,6 @@ OUTPUT:
"qualified_name": "Foo",
"definition": "1:3:7",
"uses": ["1:1:7", "1:2:7", "*1:3:7", "1:4:7"]
}],
"functions": [],
"variables": []
}]
}
*/
*/

6
tests/constructors/constructor.cc

@ -20,7 +20,7 @@ OUTPUT:
"funcs": [0],
"uses": ["*1:1:7", "1:3:3", "*1:7:3", "*1:8:3", "*1:8:17"]
}],
"functions": [{
"funcs": [{
"id": 0,
"usr": "c:@S@Foo@F@Foo#",
"short_name": "Foo",
@ -38,7 +38,7 @@ OUTPUT:
"callees": ["0@1:7:7", "0@1:8:17"],
"uses": ["1:6:6"]
}],
"variables": [{
"vars": [{
"id": 0,
"usr": "c:constructor.cc@56@F@foo#@f",
"short_name": "f",
@ -56,4 +56,4 @@ OUTPUT:
"uses": ["1:8:8"]
}]
}
*/
*/

6
tests/constructors/destructor.cc

@ -25,7 +25,7 @@ OUTPUT:
"funcs": [0, 1],
"uses": ["*1:1:7", "1:3:3", "1:4:3", "*1:8:3"]
}],
"functions": [{
"funcs": [{
"id": 0,
"usr": "c:@S@Foo@F@Foo#",
"short_name": "Foo",
@ -51,7 +51,7 @@ OUTPUT:
"callees": ["0@1:8:7"],
"uses": ["1:7:6"]
}],
"variables": [{
"vars": [{
"id": 0,
"usr": "c:destructor.cc@70@F@foo#@f",
"short_name": "f",
@ -61,4 +61,4 @@ OUTPUT:
"uses": ["1:8:7"]
}]
}
*/
*/

7
tests/constructors/invalid_reference.cc

@ -15,7 +15,7 @@ OUTPUT:
"funcs": [0],
"uses": ["*1:1:8", "1:4:6", "1:4:1"]
}],
"functions": [{
"funcs": [{
"id": 0,
"usr": "c:@S@Foo@FT@>1#TFoo#v#",
"short_name": "Foo",
@ -23,7 +23,6 @@ OUTPUT:
"definition": "1:4:6",
"declaring_type": 0,
"uses": ["1:4:6"]
}],
"variables": []
}]
}
*/
*/

6
tests/declaration_vs_definition/class.cc

@ -15,8 +15,6 @@ OUTPUT:
"qualified_name": "Foo",
"definition": "1:3:7",
"uses": ["1:1:7", "1:2:7", "*1:3:7", "1:4:7"]
}],
"functions": [],
"variables": []
}]
}
*/
*/

5
tests/declaration_vs_definition/class_member.cc

@ -14,8 +14,7 @@ OUTPUT:
"vars": [0],
"uses": ["*1:1:7"]
}],
"functions": [],
"variables": [{
"vars": [{
"id": 0,
"usr": "c:@S@Foo@FI@foo",
"short_name": "foo",
@ -25,4 +24,4 @@ OUTPUT:
"uses": ["1:2:7"]
}]
}
*/
*/

5
tests/declaration_vs_definition/class_member_static.cc

@ -16,8 +16,7 @@ OUTPUT:
"vars": [0],
"uses": ["*1:1:7", "1:5:5"]
}],
"functions": [],
"variables": [{
"vars": [{
"id": 0,
"usr": "c:@S@Foo@foo",
"short_name": "foo",
@ -28,4 +27,4 @@ OUTPUT:
"uses": ["1:2:14", "1:5:10"]
}]
}
*/
*/

7
tests/declaration_vs_definition/func.cc

@ -8,7 +8,7 @@ void foo();
OUTPUT:
{
"types": [],
"functions": [{
"funcs": [{
"id": 0,
"usr": "c:@F@foo#",
"short_name": "foo",
@ -16,8 +16,7 @@ OUTPUT:
"declarations": ["1:1:6", "1:2:6", "1:4:6"],
"definition": "1:3:6",
"uses": ["1:1:6", "1:2:6", "1:3:6", "1:4:6"]
}],
"variables": []
}]
}
*/
*/

6
tests/declaration_vs_definition/method.cc

@ -18,7 +18,7 @@ OUTPUT:
"funcs": [0, 1, 2],
"uses": ["*1:1:7", "1:7:6"]
}],
"functions": [{
"funcs": [{
"id": 0,
"usr": "c:@S@Foo@F@declonly#",
"short_name": "declonly",
@ -44,6 +44,6 @@ OUTPUT:
"declaring_type": 0,
"uses": ["1:4:8", "1:7:11"]
}],
"variables": []
"vars": []
}
*/
*/

5
tests/enums/enum_class_decl.cc

@ -15,8 +15,7 @@ OUTPUT:
"vars": [0, 1],
"uses": ["*1:1:12"]
}],
"functions": [],
"variables": [{
"vars": [{
"id": 0,
"usr": "c:@E@Foo@A",
"short_name": "A",
@ -36,4 +35,4 @@ OUTPUT:
"uses": ["1:3:3"]
}]
}
*/
*/

5
tests/enums/enum_decl.cc

@ -15,8 +15,7 @@ OUTPUT:
"vars": [0, 1],
"uses": ["*1:1:6"]
}],
"functions": [],
"variables": [{
"vars": [{
"id": 0,
"usr": "c:@E@Foo@A",
"short_name": "A",
@ -36,4 +35,4 @@ OUTPUT:
"uses": ["1:3:3"]
}]
}
*/
*/

5
tests/enums/enum_inherit.cc

@ -15,8 +15,7 @@ OUTPUT:
"vars": [0, 1],
"uses": ["*1:1:6"]
}],
"functions": [],
"variables": [{
"vars": [{
"id": 0,
"usr": "c:@E@Foo@A",
"short_name": "A",
@ -36,4 +35,4 @@ OUTPUT:
"uses": ["1:3:3"]
}]
}
*/
*/

5
tests/enums/enum_usage.cc

@ -17,8 +17,7 @@ OUTPUT:
"vars": [0, 1],
"uses": ["*1:1:12", "*1:6:1", "1:6:9"]
}],
"functions": [],
"variables": [{
"vars": [{
"id": 0,
"usr": "c:@E@Foo@A",
"short_name": "A",
@ -46,4 +45,4 @@ OUTPUT:
"uses": ["1:6:5"]
}]
}
*/
*/

5
tests/foobar.cc

@ -40,8 +40,7 @@ OUTPUT:
"definition": "1:6:10",
"uses": ["*1:6:10", "*1:9:9"]
}],
"functions": [],
"variables": [{
"vars": [{
"id": 0,
"usr": "c:@a",
"short_name": "a",
@ -60,4 +59,4 @@ OUTPUT:
}]
}
*/
*/

7
tests/function_declaration.cc

@ -4,14 +4,13 @@ void foo(int a, int b);
OUTPUT:
{
"types": [],
"functions": [{
"funcs": [{
"id": 0,
"usr": "c:@F@foo#I#I#",
"short_name": "foo",
"qualified_name": "foo",
"declarations": ["1:1:6"],
"uses": ["1:1:6"]
}],
"variables": []
}]
}
*/
*/

7
tests/function_declaration_definition.cc

@ -6,7 +6,7 @@ void foo() {}
OUTPUT:
{
"types": [],
"functions": [{
"funcs": [{
"id": 0,
"usr": "c:@F@foo#",
"short_name": "foo",
@ -14,7 +14,6 @@ OUTPUT:
"declarations": ["1:1:6"],
"definition": "1:3:6",
"uses": ["1:1:6", "1:3:6"]
}],
"variables": []
}]
}
*/
*/

7
tests/function_definition.cc

@ -4,14 +4,13 @@ void foo() {}
OUTPUT:
{
"types": [],
"functions": [{
"funcs": [{
"id": 0,
"usr": "c:@F@foo#",
"short_name": "foo",
"qualified_name": "foo",
"definition": "1:1:6",
"uses": ["1:1:6"]
}],
"variables": []
}]
}
*/
*/

7
tests/method_declaration.cc

@ -18,7 +18,7 @@ OUTPUT:
"funcs": [0],
"uses": ["*1:1:7"]
}],
"functions": [{
"funcs": [{
"id": 0,
"usr": "c:@S@Foo@F@foo#",
"short_name": "foo",
@ -26,7 +26,6 @@ OUTPUT:
"declarations": ["1:2:8"],
"declaring_type": 0,
"uses": ["1:2:8"]
}],
"variables": []
}]
}
*/
*/

7
tests/method_definition.cc

@ -16,7 +16,7 @@ OUTPUT:
"funcs": [0],
"uses": ["*1:1:7", "1:5:6"]
}],
"functions": [{
"funcs": [{
"id": 0,
"usr": "c:@S@Foo@F@foo#",
"short_name": "foo",
@ -25,7 +25,6 @@ OUTPUT:
"definition": "1:5:11",
"declaring_type": 0,
"uses": ["1:2:8", "1:5:11"]
}],
"variables": []
}]
}
*/
*/

7
tests/method_inline_declaration.cc

@ -14,7 +14,7 @@ OUTPUT:
"funcs": [0],
"uses": ["*1:1:7"]
}],
"functions": [{
"funcs": [{
"id": 0,
"usr": "c:@S@Foo@F@foo#",
"short_name": "foo",
@ -22,7 +22,6 @@ OUTPUT:
"definition": "1:2:8",
"declaring_type": 0,
"uses": ["1:2:8"]
}],
"variables": []
}]
}
*/
*/

8
tests/namespaces/anonymous_function.cc

@ -5,15 +5,13 @@ void foo();
/*
OUTPUT:
{
"types": [],
"functions": [{
"funcs": [{
"id": 0,
"usr": "c:anonymous_function.cc@aN@F@foo#",
"short_name": "foo",
"qualified_name": "::foo",
"declarations": ["1:2:6"],
"uses": ["1:2:6"]
}],
"variables": []
}]
}
*/
*/

8
tests/namespaces/function_declaration.cc

@ -5,15 +5,13 @@ void foo(int a, int b);
/*
OUTPUT:
{
"types": [],
"functions": [{
"funcs": [{
"id": 0,
"usr": "c:@N@hello@F@foo#I#I#",
"short_name": "foo",
"qualified_name": "hello::foo",
"declarations": ["1:2:6"],
"uses": ["1:2:6"]
}],
"variables": []
}]
}
*/
*/

8
tests/namespaces/function_definition.cc

@ -5,15 +5,13 @@ void foo() {}
/*
OUTPUT:
{
"types": [],
"functions": [{
"funcs": [{
"id": 0,
"usr": "c:@N@hello@F@foo#",
"short_name": "foo",
"qualified_name": "hello::foo",
"definition": "1:2:6",
"uses": ["1:2:6"]
}],
"variables": []
}]
}
*/
*/

7
tests/namespaces/method_declaration.cc

@ -16,7 +16,7 @@ OUTPUT:
"funcs": [0],
"uses": ["*1:2:7"]
}],
"functions": [{
"funcs": [{
"id": 0,
"usr": "c:@N@hello@S@Foo@F@foo#",
"short_name": "foo",
@ -24,7 +24,6 @@ OUTPUT:
"declarations": ["1:3:8"],
"declaring_type": 0,
"uses": ["1:3:8"]
}],
"variables": []
}]
}
*/
*/

6
tests/namespaces/method_definition.cc

@ -18,7 +18,7 @@ OUTPUT:
"funcs": [0],
"uses": ["*1:2:7", "1:6:6"]
}],
"functions": [{
"funcs": [{
"id": 0,
"usr": "c:@N@hello@S@Foo@F@foo#",
"short_name": "foo",
@ -28,6 +28,6 @@ OUTPUT:
"declaring_type": 0,
"uses": ["1:3:8", "1:6:11"]
}],
"variables": []
"vars": []
}
*/
*/

5
tests/namespaces/method_inline_declaration.cc

@ -24,7 +24,6 @@ OUTPUT:
"definition": "1:3:8",
"declaring_type": 0,
"uses": ["1:3:8"]
}],
"variables": []
}]
}
*/
*/

3
tests/namespaces/namespace_reference.cc

@ -12,8 +12,7 @@ void Runner() {
/*
OUTPUT:
{
"types": [],
"functions": [{
"funcs": [{
"id": 0,
"usr": "c:@N@ns@F@Accept#I#",
"short_name": "Accept",

8
tests/stl.cc

@ -134,9 +134,5 @@
/*
OUTPUT:
{
"types": [],
"functions": [],
"variables": []
}
*/
{}
*/

7
tests/templates/func_specialized_template_param.cc

@ -26,7 +26,7 @@ OUTPUT:
"funcs": [0],
"uses": ["*1:4:8", "1:8:6"]
}],
"functions": [{
"funcs": [{
"id": 0,
"usr": "c:@S@Foo@F@Bar#&$@S@Template>#d#",
"short_name": "Bar",
@ -35,7 +35,6 @@ OUTPUT:
"definition": "1:8:11",
"declaring_type": 1,
"uses": ["1:5:8", "1:8:11"]
}],
"variables": []
}]
}
*/
*/

5
tests/templates/implicit_variable_instantiation.cc

@ -33,8 +33,7 @@ OUTPUT:
"vars": [0],
"uses": ["*1:5:10", "*1:10:26", "1:13:13", "1:14:14"]
}],
"functions": [],
"variables": [{
"vars": [{
"id": 0,
"usr": "c:@N@ns@ST>1#T@Holder@static_var",
"short_name": "static_var",
@ -60,4 +59,4 @@ OUTPUT:
"uses": ["1:14:7"]
}]
}
*/
*/

6
tests/templates/namespace_template_class_template_func_usage_folded_into_one.cc

@ -23,7 +23,7 @@ OUTPUT:
"funcs": [0],
"uses": ["*1:3:10", "1:10:11", "1:11:11"]
}],
"functions": [{
"funcs": [{
"id": 0,
"usr": "c:@N@ns@ST>1#T@Foo@FT@>1#Tfoo#I#S",
"short_name": "foo",
@ -32,7 +32,7 @@ OUTPUT:
"declaring_type": 0,
"uses": ["1:5:16", "1:10:21", "1:11:22"]
}],
"variables": [{
"vars": [{
"id": 0,
"usr": "c:@N@ns@a",
"short_name": "a",
@ -48,4 +48,4 @@ OUTPUT:
"uses": ["1:11:7"]
}]
}
*/
*/

6
tests/templates/namespace_template_type_usage_folded_into_one.cc

@ -17,8 +17,8 @@ OUTPUT:
"definition": "1:3:9",
"uses": ["*1:3:9", "*1:5:3", "*1:6:3"]
}],
"functions": [],
"variables": [{
"funcs": [],
"vars": [{
"id": 0,
"usr": "c:@N@ns@a",
"short_name": "a",
@ -36,4 +36,4 @@ OUTPUT:
"uses": ["1:6:13"]
}]
}
*/
*/

7
tests/templates/specialized_func_definition.cc

@ -24,7 +24,7 @@ OUTPUT:
"funcs": [0],
"uses": ["*1:2:7", "*1:7:6", "1:9:6"]
}],
"functions": [{
"funcs": [{
"id": 0,
"usr": "c:@ST>1#T@Template@F@Foo#",
"short_name": "Foo",
@ -33,7 +33,6 @@ OUTPUT:
"definition": "1:7:19",
"declaring_type": 0,
"uses": ["1:3:8", "1:7:19", "1:9:22"]
}],
"variables": []
}]
}
*/
*/

6
tests/templates/template_class_func_usage_folded_into_one.cc

@ -20,7 +20,7 @@ OUTPUT:
"funcs": [0],
"uses": ["*1:2:8", "1:8:9", "1:9:9"]
}],
"functions": [{
"funcs": [{
"id": 0,
"usr": "c:@ST>1#T@Foo@F@foo#S",
"short_name": "foo",
@ -29,7 +29,7 @@ OUTPUT:
"declaring_type": 0,
"uses": ["1:3:14", "1:8:19", "1:9:20"]
}],
"variables": [{
"vars": [{
"id": 0,
"usr": "c:@a",
"short_name": "a",
@ -45,4 +45,4 @@ OUTPUT:
"uses": ["1:9:5"]
}]
}
*/
*/

6
tests/templates/template_class_template_func_usage_folded_into_one.cc

@ -21,7 +21,7 @@ OUTPUT:
"funcs": [0],
"uses": ["*1:2:8", "1:9:9", "1:10:9"]
}],
"functions": [{
"funcs": [{
"id": 0,
"usr": "c:@ST>1#T@Foo@FT@>1#Tfoo#I#S",
"short_name": "foo",
@ -30,7 +30,7 @@ OUTPUT:
"declaring_type": 0,
"uses": ["1:4:14", "1:9:19", "1:10:20"]
}],
"variables": [{
"vars": [{
"id": 0,
"usr": "c:@a",
"short_name": "a",
@ -46,4 +46,4 @@ OUTPUT:
"uses": ["1:10:5"]
}]
}
*/
*/

5
tests/templates/template_class_type_usage_folded_into_one.cc

@ -59,8 +59,7 @@ OUTPUT:
"definition": "1:6:10",
"uses": ["*1:6:10", "*1:9:9", "*1:10:9"]
}],
"functions": [],
"variables": [{
"vars": [{
"id": 0,
"usr": "c:@a",
"short_name": "a",
@ -78,4 +77,4 @@ OUTPUT:
"uses": ["1:10:15"]
}]
}
*/
*/

5
tests/templates/template_class_var_usage_folded_into_one.cc

@ -17,8 +17,7 @@ OUTPUT:
"definition": "1:2:8",
"uses": ["*1:2:8", "1:6:9", "1:7:9"]
}],
"functions": [],
"variables": [{
"vars": [{
"id": 0,
"usr": "c:@ST>1#T@Foo@var",
"short_name": "var",
@ -41,4 +40,4 @@ OUTPUT:
"uses": ["1:7:5"]
}]
}
*/
*/

6
tests/templates/template_func_usage_folded_into_one.cc

@ -13,7 +13,7 @@ int b = foo<bool>();
OUTPUT:
{
"types": [],
"functions": [{
"funcs": [{
"id": 0,
"usr": "c:template_func_usage_folded_into_one.cc@FT@>1#Tfoo#I#",
"short_name": "foo",
@ -21,7 +21,7 @@ OUTPUT:
"definition": "1:2:12",
"uses": ["1:2:12", "1:6:9", "1:7:9"]
}],
"variables": [{
"vars": [{
"id": 0,
"usr": "c:@a",
"short_name": "a",
@ -37,4 +37,4 @@ OUTPUT:
"uses": ["1:7:5"]
}]
}
*/
*/

5
tests/templates/template_type_usage_folded_into_one.cc

@ -15,8 +15,7 @@ OUTPUT:
"definition": "1:2:7",
"uses": ["*1:2:7", "*1:4:1", "*1:5:1"]
}],
"functions": [],
"variables": [{
"vars": [{
"id": 0,
"usr": "c:@a",
"short_name": "a",
@ -34,4 +33,4 @@ OUTPUT:
"uses": ["1:5:11"]
}]
}
*/
*/

5
tests/templates/template_var_usage_folded_into_one.cc

@ -46,8 +46,7 @@ OUTPUT:
"definition": "1:2:6",
"uses": ["*1:2:6", "1:8:13"]
}],
"functions": [],
"variables": [{
"vars": [{
"id": 0,
"usr": "c:@var",
"short_name": "var",
@ -70,4 +69,4 @@ OUTPUT:
"uses": ["1:8:5"]
}]
}
*/
*/

Loading…
Cancel
Save