Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -49,5 +49,15 @@ let package:Package = .init(
dependencies: [
.target(name: "JSON"),
]),

.testTarget(name: "JSONStressTestST",
dependencies: [
.target(name: "JSON"),
]),

.executableTarget(name: "JSONStressTest",
dependencies: [
.target(name: "JSON"),
]),
]
)
17 changes: 17 additions & 0 deletions Sources/JSONStressTest/main.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import Foundation
import JSON

@main
enum Main
{
static func main() throws
{
let file:Data = try Data.init(
contentsOf: URL.init(fileURLWithPath: "Test Inputs/Swift.symbols.json"))

let json:JSON = JSON.init(utf8: [UInt8].init(file)[...])
let object:JSON.Object = try .init(parsing: json)

print(object.fields.map(\.0))
}
}
19 changes: 19 additions & 0 deletions Sources/JSONStressTestST/main.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import Foundation
import JSON
import Testing

@Suite
enum Main
{
@Test
static func main() throws
{
let file:Data = try Data.init(
contentsOf: URL.init(fileURLWithPath: "Test Inputs/Swift.symbols.json"))

let json:JSON = JSON.init(utf8: [UInt8].init(file)[...])
let object:JSON.Object = try .init(parsing: json)

print(object.fields.map(\.0))
}
}
Loading
Loading