Skip to content

Commit f0a3549

Browse files
committed
Fix tests
1 parent 082c5e4 commit f0a3549

2 files changed

Lines changed: 8 additions & 0 deletions

File tree

extensions/ql-vscode/test/unit-tests/common/sarif-utils.test.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ describe("parsing sarif", () => {
117117
},
118118
};
119119
expect(parseSarifLocation(location, "prefix")).toEqual({
120+
type: "wholeFileLocation",
120121
uri: "file:/prefix/abc?x=test",
121122
userVisibleFile: "abc?x=test",
122123
});
@@ -131,6 +132,7 @@ describe("parsing sarif", () => {
131132
},
132133
};
133134
expect(parseSarifLocation(location, "prefix")).toEqual({
135+
type: "wholeFileLocation",
134136
uri: "file:/abc%3Fx%3Dtest",
135137
userVisibleFile: "/abc?x=test",
136138
});
@@ -151,6 +153,7 @@ describe("parsing sarif", () => {
151153
},
152154
};
153155
expect(parseSarifLocation(location, "prefix")).toEqual({
156+
type: "lineColumnLocation",
154157
uri: "file:abc%3Fx%3Dtest",
155158
userVisibleFile: "abc?x=test",
156159
startLine: 1,

extensions/ql-vscode/test/vscode-tests/no-workspace/language-support/ast-viewer/ast-builder.test.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ describe("AstBuilder", () => {
8585
id: 26359,
8686
label: "params",
8787
location: {
88+
type: "lineColumnLocation",
8889
endColumn: 22,
8990
endLine: 19,
9091
startColumn: 5,
@@ -115,6 +116,7 @@ describe("AstBuilder", () => {
115116
id: 26367,
116117
label: "body: [Block] { ... }",
117118
location: {
119+
type: "lineColumnLocation",
118120
endColumn: 1,
119121
endLine: 22,
120122
startColumn: 1,
@@ -178,6 +180,7 @@ const expectedRoots = [
178180
label: "[TopLevelFunction] int disable_interrupts()",
179181
fileLocation: undefined,
180182
location: {
183+
type: "lineColumnLocation",
181184
uri: "file:/opt/src/arch/sandbox/lib/interrupts.c",
182185
startLine: 19,
183186
startColumn: 5,
@@ -192,6 +195,7 @@ const expectedRoots = [
192195
label: "[TopLevelFunction] void enable_interrupts()",
193196
fileLocation: undefined,
194197
location: {
198+
type: "lineColumnLocation",
195199
uri: "file:/opt/src/arch/sandbox/lib/interrupts.c",
196200
startLine: 15,
197201
startColumn: 6,
@@ -206,6 +210,7 @@ const expectedRoots = [
206210
label: "[TopLevelFunction] int interrupt_init()",
207211
fileLocation: undefined,
208212
location: {
213+
type: "lineColumnLocation",
209214
uri: "file:/opt/src/arch/sandbox/lib/interrupts.c",
210215
startLine: 10,
211216
startColumn: 5,

0 commit comments

Comments
 (0)