We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 359b2a9 commit 181061bCopy full SHA for 181061b
IntegrationTests/TestSuites/Sources/PrimaryTests/main.swift
@@ -260,10 +260,11 @@ try test("Closure Lifetime") {
260
#if JAVASCRIPTKIT_WITHOUT_WEAKREFS
261
// Check diagnostics of use-after-free
262
do {
263
+ let c1Line = #line + 1
264
let c1 = JSClosure { $0[0] }
265
c1.release()
266
let error = try expectThrow(try evalClosure.throws(c1, JSValue.number(42.0))) as! JSValue
- try expect("Error message should contains definition location", error.description.hasSuffix("PrimaryTests/main.swift:247"))
267
+ try expect("Error message should contains definition location", error.description.hasSuffix("PrimaryTests/main.swift:\(c1Line)"))
268
}
269
#endif
270
0 commit comments