Skip to content

Commit

Permalink
LibCpp: Update regressions tests results
Browse files Browse the repository at this point in the history
The LibCpp regression tests results have to be updated after tweaking
the token end position calculation logic of some token types.
  • Loading branch information
itamar8910 authored and awesomekling committed Feb 8, 2022
1 parent b67a090 commit 605becb
Show file tree
Hide file tree
Showing 11 changed files with 202 additions and 198 deletions.
2 changes: 1 addition & 1 deletion Userland/DevTools/HackStudio/LanguageServers/Cpp/Tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ void test_complete_includes()
if (suggestions.size() != 1)
FAIL(project include - bad size);

if (suggestions[0].completion != "sample_header.h")
if (suggestions[0].completion != "\"sample_header.h\"")
FAIL("project include - wrong results");

suggestions = autocomplete.get_suggestions("complete_includes.cpp", { 1, 18 });
Expand Down
8 changes: 4 additions & 4 deletions Userland/Libraries/LibCpp/Tests/parser/class.ast
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,23 @@ TranslationUnit[0:0->10:1]
(
Parameter[1:6->1:10]
z
NamedType[1:6->1:10]
NamedType[1:6->1:8]
int
)
D'tor
(
)
FunctionDeclaration[3:4->3:14]
NamedType[3:4->3:9]
NamedType[3:4->3:7]
void
foo
(
)
VariableDeclaration[6:4->8:0]
NamedType[6:4->6:8]
NamedType[6:4->6:6]
int
x
VariableDeclaration[9:4->10:0]
NamedType[9:4->9:8]
NamedType[9:4->9:6]
int
y
2 changes: 1 addition & 1 deletion Userland/Libraries/LibCpp/Tests/parser/function-decl.ast
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
TranslationUnit[0:0->2:0]
FunctionDeclaration[0:0->2:0]
NamedType[0:0->0:4]
NamedType[0:0->0:2]
int
foo
(
Expand Down
2 changes: 1 addition & 1 deletion Userland/Libraries/LibCpp/Tests/parser/if-else.ast
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
TranslationUnit[0:0->7:0]
FunctionDeclaration[0:0->7:0]
NamedType[0:0->0:4]
NamedType[0:0->0:2]
int
foo
(
Expand Down
16 changes: 8 additions & 8 deletions Userland/Libraries/LibCpp/Tests/parser/local-vars.ast
Original file line number Diff line number Diff line change
@@ -1,33 +1,33 @@
TranslationUnit[1:0->7:0]
FunctionDeclaration[1:0->7:0]
NamedType[1:0->1:4]
NamedType[1:0->1:2]
int
foo
(
)
FunctionDefinition[2:0->7:0]
{
VariableDeclaration[3:4->3:9]
NamedType[3:4->3:8]
NamedType[3:4->3:6]
int
x
VariableDeclaration[4:4->4:16]
NamedType[4:4->4:11]
NamedType[4:4->4:9]
double
y
NumericLiteral[4:15->4:15]
2
VariableDeclaration[5:4->5:20]
NamedType[5:4->5:11]
NamedType[5:4->5:9]
double
z
BinaryExpression[5:15->5:20]
Name[5:15->5:17]
BinaryExpression[5:15->5:19]
Name[5:15->5:15]
x
+
Name[5:19->5:20]
Name[5:19->5:19]
y
ReturnStatement[6:4->6:12]
Name[6:11->6:12]
Name[6:11->6:11]
z
}
Loading

0 comments on commit 605becb

Please sign in to comment.