diff --git a/Tests/p4rseTests/SupportTests/SourceCode.swift b/Tests/p4rseTests/SupportTests/SourceCode.swift index 7327e23..f8e66a8 100644 --- a/Tests/p4rseTests/SupportTests/SourceCode.swift +++ b/Tests/p4rseTests/SupportTests/SourceCode.swift @@ -32,7 +32,8 @@ import TreeSitterP4 let sm = SourceManager(["./TestData/Sources/"]) let prep = SourceCodePreprocessor(sm) let file = FilePath.init(stringLiteral: "./TestData/Sources/simple.p4") - let expected_file = FilePath.init(FileManager().currentDirectoryPath + "/" + file.string).lexicallyNormalized() + let expected_file = FilePath.init(FileManager().currentDirectoryPath + "/" + file.string) + .lexicallyNormalized() let source = try! (#UseOkResult(prep.preprocess(file))) let program = try! #UseOkResult(Program.Compile(source.getSource())) @@ -44,7 +45,8 @@ import TreeSitterP4 let sm = SourceManager(["./TestData/Sources/"]) let prep = SourceCodePreprocessor(sm) let file = FilePath.init(stringLiteral: "simple.p4") - let expected_file = FilePath.init(FileManager().currentDirectoryPath + "/TestData/Sources/simple.p4") + let expected_file = FilePath.init( + FileManager().currentDirectoryPath + "/TestData/Sources/simple.p4") let source = try! (#UseOkResult(prep.preprocess(file))) let program = try! #UseOkResult(Program.Compile(source.getSource())) @@ -56,7 +58,8 @@ import TreeSitterP4 let sm = SourceManager(["./TestData/Sources/"]) let prep = SourceCodePreprocessor(sm) let file = FilePath.init(stringLiteral: "./TestData/Sources/simple-split.p4") - let expected_file = FilePath.init(FileManager().currentDirectoryPath + "/" + file.string).lexicallyNormalized() + let expected_file = FilePath.init(FileManager().currentDirectoryPath + "/" + file.string) + .lexicallyNormalized() #expect(#RequireOkResult(prep.preprocess(file))) @@ -70,7 +73,8 @@ import TreeSitterP4 let sm = SourceManager(["./TestData/Sources/"]) let prep = SourceCodePreprocessor(sm) let file = FilePath.init(stringLiteral: "./TestData/Sources/simple-split-oneline.p4") - let expected_file = FilePath.init(FileManager().currentDirectoryPath + "/" + file.string).lexicallyNormalized() + let expected_file = FilePath.init(FileManager().currentDirectoryPath + "/" + file.string) + .lexicallyNormalized() #expect(#RequireOkResult(prep.preprocess(file))) @@ -229,8 +233,8 @@ import TreeSitterP4 } @Test func test_source_location_contains2_a() async throws { - let outer = SourceLocation(0,500) - let not_inner = SourceLocation(0,501) + let outer = SourceLocation(0, 500) + let not_inner = SourceLocation(0, 501) #expect(!outer.contains(not_inner)) } @@ -243,8 +247,8 @@ import TreeSitterP4 } @Test func test_source_location_contains3_a() async throws { - let outer = SourceLocation(200,300) - let inner = SourceLocation(200,299) + let outer = SourceLocation(200, 300) + let inner = SourceLocation(200, 299) #expect(outer.contains(inner)) } @@ -258,7 +262,7 @@ import TreeSitterP4 @Test func test_source_location_contains5() async throws { let outer = SourceLocation(200..<300) - let not_inner = SourceLocation(200,101) + let not_inner = SourceLocation(200, 101) #expect(!outer.contains(not_inner)) -} \ No newline at end of file +}