Show diagnostics for tests, update absolute paths

This commit is contained in:
Jacob Dufault 2017-06-08 22:30:11 -07:00
parent fda39a1a8e
commit 598b53efff
8 changed files with 153 additions and 142 deletions

View File

@ -128,10 +128,12 @@ void RunTests() {
{
"-xc++",
"-std=c++11",
"-IC:/Users/jacob/Desktop/superindex/indexer/third_party/",
"-IC:/Users/jacob/Desktop/superindex/indexer/third_party/doctest/",
"-IC:/Users/jacob/Desktop/superindex/indexer/third_party/rapidjson/include",
"-IC:/Users/jacob/Desktop/superindex/indexer/src"
"-IC:/Users/jacob/Desktop/cquery/third_party/",
"-IC:/Users/jacob/Desktop/cquery/third_party/doctest/",
"-IC:/Users/jacob/Desktop/cquery/third_party/rapidjson/include",
"-IC:/Users/jacob/Desktop/cquery/src",
"-isystemC:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.10.25017/include",
"-isystemC:/Program Files (x86)/Windows Kits/10/Include/10.0.15063.0/ucrt"
},
"", nullopt,
&perf,
@ -150,6 +152,11 @@ void RunTests() {
if (db) {
VerifySerializeToFrom(db);
actual_output = db->ToString();
for (lsDiagnostic diag : db->diagnostics) {
std::cerr << db->path << ":" << diag.range.start.line << ":" << diag.range.end.character << ": " << diag.message << std::endl;
}
}
// Compare output via rapidjson::Document to ignore any formatting

View File

@ -52,9 +52,9 @@ OUTPUT: funky_enum.cc
{
"includes": [{
"line": 2,
"resolved_path": "C:/Users/jacob/Desktop/superindex/indexer/tests/multi_file/funky_enum.h"
"resolved_path": "C:/Users/jacob/Desktop/cquery/tests/multi_file/funky_enum.h"
}],
"dependencies": ["C:/Users/jacob/Desktop/superindex/indexer/tests/multi_file/funky_enum.h"],
"dependencies": ["C:/Users/jacob/Desktop/cquery/tests/multi_file/funky_enum.h"],
"types": [{
"id": 0,
"usr": "c:@E@Foo",

View File

@ -117,9 +117,9 @@ OUTPUT: impl.cc
{
"includes": [{
"line": 1,
"resolved_path": "C:/Users/jacob/Desktop/superindex/indexer/tests/multi_file/header.h"
"resolved_path": "C:/Users/jacob/Desktop/cquery/tests/multi_file/header.h"
}],
"dependencies": ["C:/Users/jacob/Desktop/superindex/indexer/tests/multi_file/header.h"],
"dependencies": ["C:/Users/jacob/Desktop/cquery/tests/multi_file/header.h"],
"funcs": [{
"id": 0,
"usr": "c:@F@Impl#",

View File

@ -23,9 +23,9 @@ OUTPUT: simple_impl.cc
{
"includes": [{
"line": 1,
"resolved_path": "C:/Users/jacob/Desktop/superindex/indexer/tests/multi_file/simple_header.h"
"resolved_path": "C:/Users/jacob/Desktop/cquery/tests/multi_file/simple_header.h"
}],
"dependencies": ["C:/Users/jacob/Desktop/superindex/indexer/tests/multi_file/simple_header.h"],
"dependencies": ["C:/Users/jacob/Desktop/cquery/tests/multi_file/simple_header.h"],
"funcs": [{
"id": 0,
"usr": "c:@F@impl#",

View File

@ -32,9 +32,9 @@ OUTPUT: static.cc
{
"includes": [{
"line": 1,
"resolved_path": "C:/Users/jacob/Desktop/superindex/indexer/tests/multi_file/static.h"
"resolved_path": "C:/Users/jacob/Desktop/cquery/tests/multi_file/static.h"
}],
"dependencies": ["C:/Users/jacob/Desktop/superindex/indexer/tests/multi_file/static.h"],
"dependencies": ["C:/Users/jacob/Desktop/cquery/tests/multi_file/static.h"],
"types": [{
"id": 0,
"usr": "c:@S@Buffer",

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long