Skip to content

Commit 6a0b48d

Browse files
committed
Tests adding @rescript/core to the tests.
Just to see how things look like. One comment is that the local file `Object.res` had to be renames as otherwise it would become unreachable. This is a side-effect of doing `-open RescriptCore` globally, which overrides the local scope. This won't be a problem when the library is integrated in the compiler.
1 parent 1029028 commit 6a0b48d

32 files changed

+1518
-348
lines changed

analysis/tests/bsconfig.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"subdirs": true
1010
}
1111
],
12-
"bsc-flags": ["-w -33-44"],
13-
"bs-dependencies": ["@rescript/react"],
12+
"bsc-flags": ["-w -33-44", "-open RescriptCore"],
13+
"bs-dependencies": ["@rescript/react", "@rescript/core"],
1414
"jsx": { "version": 3 }
1515
}

analysis/tests/package-lock.json

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

analysis/tests/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
"@rescript/react": "^0.11.0-rc.3"
99
},
1010
"dependencies": {
11+
"@rescript/core": "^0.1.0",
1112
"rescript": "^10.1.3"
1213
}
1314
}

analysis/tests/src/Completion.res

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,11 +96,11 @@ let nestedObj = {"x": {"y": {"name": "a", "age": 32}}}
9696
// nestedObj["x"]["y"]["
9797
// ^com
9898

99-
let o: Object.objT = assert false
99+
let o: Objects.objT = assert false
100100
// o["a
101101
// ^com
102102

103-
type nestedObjT = {"x": Object.nestedObjT}
103+
type nestedObjT = {"x": Objects.nestedObjT}
104104
let no: nestedObjT = assert false
105105
// no["x"]["y"]["
106106
// ^com
File renamed without changes.

analysis/tests/src/expected/BrokenParserCases.res.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,16 @@ Complete src/BrokenParserCases.res 2:24
22
posCursor:[2:24] posNoWhite:[2:23] Found expr:[2:11->2:30]
33
Pexp_apply ...[2:11->2:17] (~isOff2:19->2:24=...[2:27->2:29])
44
Completable: CnamedArg(Value[someFn], isOff, [isOff])
5+
Package opens RescriptCore.place holder
6+
Resolved opens 1 RescriptCore.res
57
[]
68

79
Complete src/BrokenParserCases.res 6:17
810
posCursor:[6:17] posNoWhite:[6:16] Found expr:[6:3->6:21]
911
posCursor:[6:17] posNoWhite:[6:16] Found pattern:[6:16->6:19]
1012
Completable: Cpattern Value[s]=t
13+
Package opens RescriptCore.place holder
14+
Resolved opens 1 RescriptCore.res
1115
[]
1216

1317
Complete src/BrokenParserCases.res 10:29
@@ -16,5 +20,7 @@ posCursor:[10:29] posNoWhite:[10:27] Found pattern:[10:24->10:39]
1620
posCursor:[10:29] posNoWhite:[10:27] Found pattern:[10:24->10:28]
1721
Ppat_construct None:[10:24->10:28]
1822
Completable: Cpath Value[None]
23+
Package opens RescriptCore.place holder
24+
Resolved opens 1 RescriptCore.res
1925
[]
2026

analysis/tests/src/expected/CompletePrioritize1.res.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
Complete src/CompletePrioritize1.res 5:6
22
posCursor:[5:6] posNoWhite:[5:5] Found expr:[5:3->0:-1]
33
Completable: Cpath Value[a]->
4+
Package opens RescriptCore.place holder
5+
Resolved opens 1 RescriptCore.res
46
[{
57
"label": "Test.add",
68
"kind": 12,

analysis/tests/src/expected/CompletePrioritize2.res.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
Complete src/CompletePrioritize2.res 9:7
22
posCursor:[9:7] posNoWhite:[9:6] Found expr:[9:3->0:-1]
33
Completable: Cpath Value[ax]->
4+
Package opens RescriptCore.place holder
5+
Resolved opens 1 RescriptCore.res
46
[{
57
"label": "Test.add",
68
"kind": 12,
@@ -13,6 +15,8 @@ Complete src/CompletePrioritize2.res 12:5
1315
posCursor:[12:5] posNoWhite:[12:4] Found expr:[12:3->12:5]
1416
Pexp_ident ax:[12:3->12:5]
1517
Completable: Cpath Value[ax]
18+
Package opens RescriptCore.place holder
19+
Resolved opens 1 RescriptCore.res
1620
[{
1721
"label": "ax",
1822
"kind": 12,

0 commit comments

Comments
 (0)