Skip to content

Commit 9f94aff

Browse files
committed
Decrease max nesting level in debug
1 parent f522608 commit 9f94aff

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Tests/SwiftParserTest/ParserTests.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ public class ParserTests: XCTestCase {
2323
let fileContents = try Data(contentsOf: fileURL)
2424
let parsed = fileContents.withUnsafeBytes({ buffer in
2525
// Release builds are fine with the default maximum nesting level of 256.
26-
// Debug builds overflow with any stack size bigger than 25-ish.
27-
Parser.parse(source: buffer.bindMemory(to: UInt8.self), maximumNestingLevel: 25)
26+
// Debug builds overflow with any stack size bigger than 20-ish.
27+
Parser.parse(source: buffer.bindMemory(to: UInt8.self), maximumNestingLevel: 20)
2828
})
2929
assertDataEqualWithDiff(
3030
Data(parsed.syntaxTextBytes),

0 commit comments

Comments
 (0)