Skip to content

Commit 3fc807f

Browse files
committed
[scip-to-glean facebookincubator#2] Update Rust, Typescript and Python-scip tests
1 parent c7871ff commit 3fc807f

39 files changed

Lines changed: 1279 additions & 529 deletions

glean/lang/codemarkup/tests/typescript/Glean/Regression/TypeScript/Main.hs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,10 @@ import Glean.Regression.Snapshot
1515
import Glean.Regression.Snapshot.Driver
1616

1717
main :: IO ()
18-
main = getArgs >>= \args -> withArgs (args ++ ["--root", path]) $
19-
testMain (driverFromIndexer Typescript.indexer)
18+
main = getArgs >>= \args ->
19+
withArgs (args ++ ["--rust-indexer", scipToGlean, "--root", path]) $
20+
testMain (driverFromIndexer Typescript.indexer)
2021
where
2122
path = "glean/lang/typescript/tests/cases"
23+
scipToGlean =
24+
"glean/lang/scip/indexer/scip_to_glean/target/release/scip-to-glean"

glean/lang/dotnet-scip/tests/Glean/Regression/DotnetScip/Main.hs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,10 @@ import Glean.Regression.Snapshot
1515
import Glean.Regression.Snapshot.Driver
1616

1717
main :: IO ()
18-
main = getArgs >>= \args -> withArgs (args ++ ["--root", path]) $
19-
testMain (driverFromIndexer DotnetScip.indexer)
18+
main = getArgs >>= \args ->
19+
withArgs (args ++ ["--rust-indexer", scipToGlean, "--root", path]) $
20+
testMain (driverFromIndexer DotnetScip.indexer)
2021
where
2122
path = "glean/lang/dotnet-scip/tests/cases"
23+
scipToGlean =
24+
"glean/lang/scip/indexer/scip_to_glean/target/release/scip-to-glean"

glean/lang/python-scip/tests/Glean/Regression/PythonScip/Main.hs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,10 @@ import Glean.Regression.Snapshot
1515
import Glean.Regression.Snapshot.Driver
1616

1717
main :: IO ()
18-
main = getArgs >>= \args -> withArgs (args ++ ["--root", path]) $
19-
testMain (driverFromIndexer PythonScip.indexer)
18+
main = getArgs >>= \args ->
19+
withArgs (args ++ ["--rust-indexer", scipToGlean, "--root", path]) $
20+
testMain (driverFromIndexer PythonScip.indexer)
2021
where
2122
path = "glean/lang/python-scip/tests/cases"
23+
scipToGlean =
24+
"glean/lang/scip/indexer/scip_to_glean/target/release/scip-to-glean"

glean/lang/python-scip/tests/cases/xrefs/Definition.out

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,37 @@
11
[
22
"@generated",
3+
{
4+
"key": {
5+
"symbol": { "key": "example.py/local 0" },
6+
"location": {
7+
"key": {
8+
"file": { "key": "example.py" },
9+
"range": {
10+
"lineBegin": 76,
11+
"columnBegin": 9,
12+
"lineEnd": 76,
13+
"columnEnd": 9
14+
}
15+
}
16+
}
17+
}
18+
},
19+
{
20+
"key": {
21+
"symbol": { "key": "example.py/local 1" },
22+
"location": {
23+
"key": {
24+
"file": { "key": "example.py" },
25+
"range": {
26+
"lineBegin": 82,
27+
"columnBegin": 9,
28+
"lineEnd": 82,
29+
"columnEnd": 9
30+
}
31+
}
32+
}
33+
}
34+
},
335
{
436
"key": {
537
"symbol": { "key": "scip-python python . test example/__init__:" },
Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,5 @@
1-
{ "@generated": null, "scip.Definition.1": 21 }
1+
{
2+
"@generated": null,
3+
"facts_searched": { "scip.Definition.1": 23 },
4+
"full_scans": [ "scip.Definition.1" ]
5+
}

glean/lang/python-scip/tests/cases/xrefs/DefinitionLocation.out

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -405,6 +405,60 @@
405405
}
406406
}
407407
},
408+
{
409+
"key": {
410+
"file": { "key": "example.py" },
411+
"range": {
412+
"lineBegin": 76,
413+
"columnBegin": 9,
414+
"lineEnd": 76,
415+
"columnEnd": 9
416+
},
417+
"defn": {
418+
"key": {
419+
"symbol": { "key": "example.py/local 0" },
420+
"location": {
421+
"key": {
422+
"file": { "key": "example.py" },
423+
"range": {
424+
"lineBegin": 76,
425+
"columnBegin": 9,
426+
"lineEnd": 76,
427+
"columnEnd": 9
428+
}
429+
}
430+
}
431+
}
432+
}
433+
}
434+
},
435+
{
436+
"key": {
437+
"file": { "key": "example.py" },
438+
"range": {
439+
"lineBegin": 82,
440+
"columnBegin": 9,
441+
"lineEnd": 82,
442+
"columnEnd": 9
443+
},
444+
"defn": {
445+
"key": {
446+
"symbol": { "key": "example.py/local 1" },
447+
"location": {
448+
"key": {
449+
"file": { "key": "example.py" },
450+
"range": {
451+
"lineBegin": 82,
452+
"columnBegin": 9,
453+
"lineEnd": 82,
454+
"columnEnd": 9
455+
}
456+
}
457+
}
458+
}
459+
}
460+
}
461+
},
408462
{
409463
"key": {
410464
"file": { "key": "example.py" },
Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,5 @@
1-
{ "@generated": null, "scip.DefinitionLocation.1": 21 }
1+
{
2+
"@generated": null,
3+
"facts_searched": { "scip.DefinitionLocation.1": 23 },
4+
"full_scans": [ "scip.DefinitionLocation.1" ]
5+
}
Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,5 @@
1-
{ "@generated": null, "scip.Documentation.1": 12 }
1+
{
2+
"@generated": null,
3+
"facts_searched": { "scip.Documentation.1": 12 },
4+
"full_scans": [ "scip.Documentation.1" ]
5+
}
Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,5 @@
1-
{ "@generated": null, "scip.FileLanguage.1": 1 }
1+
{
2+
"@generated": null,
3+
"facts_searched": { "scip.FileLanguage.1": 1 },
4+
"full_scans": [ "scip.FileLanguage.1" ]
5+
}

glean/lang/python-scip/tests/cases/xrefs/FileRange.out

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -792,6 +792,17 @@
792792
}
793793
}
794794
},
795+
{
796+
"key": {
797+
"file": { "key": "example.py" },
798+
"range": {
799+
"lineBegin": 54,
800+
"columnBegin": 1,
801+
"lineEnd": 56,
802+
"columnEnd": 29
803+
}
804+
}
805+
},
795806
{
796807
"key": {
797808
"file": { "key": "example.py" },
@@ -825,6 +836,17 @@
825836
}
826837
}
827838
},
839+
{
840+
"key": {
841+
"file": { "key": "example.py" },
842+
"range": {
843+
"lineBegin": 59,
844+
"columnBegin": 1,
845+
"lineEnd": 61,
846+
"columnEnd": 31
847+
}
848+
}
849+
},
828850
{
829851
"key": {
830852
"file": { "key": "example.py" },
@@ -858,6 +880,17 @@
858880
}
859881
}
860882
},
883+
{
884+
"key": {
885+
"file": { "key": "example.py" },
886+
"range": {
887+
"lineBegin": 64,
888+
"columnBegin": 1,
889+
"lineEnd": 66,
890+
"columnEnd": 31
891+
}
892+
}
893+
},
861894
{
862895
"key": {
863896
"file": { "key": "example.py" },
@@ -891,6 +924,17 @@
891924
}
892925
}
893926
},
927+
{
928+
"key": {
929+
"file": { "key": "example.py" },
930+
"range": {
931+
"lineBegin": 69,
932+
"columnBegin": 1,
933+
"lineEnd": 71,
934+
"columnEnd": 32
935+
}
936+
}
937+
},
894938
{
895939
"key": {
896940
"file": { "key": "example.py" },
@@ -924,6 +968,17 @@
924968
}
925969
}
926970
},
971+
{
972+
"key": {
973+
"file": { "key": "example.py" },
974+
"range": {
975+
"lineBegin": 74,
976+
"columnBegin": 1,
977+
"lineEnd": 86,
978+
"columnEnd": 25
979+
}
980+
}
981+
},
927982
{
928983
"key": {
929984
"file": { "key": "example.py" },

0 commit comments

Comments
 (0)