Skip to content

Commit

Permalink
Update .swiftformat
Browse files Browse the repository at this point in the history
  • Loading branch information
atdrendel committed Mar 19, 2023
1 parent 40eab41 commit 3a69633
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions .swiftformat
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
hoistAwait, \
hoistTry

--decimalgrouping 3,5
--funcattributes prev-line
--minversion 0.47.2
--maxwidth 96
Expand Down
8 changes: 4 additions & 4 deletions Tests/WasmInterpreterTests/WasmInterpreterTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ final class WasmInterpreterTests: XCTestCase {
func testCallingTwoFunctionsWithSameImplementation() throws {
let mod = try ConstantModule()

try (1 ... 10).forEach { XCTAssertEqual(65536, try mod.constant(version: $0)) }
try (1 ... 10).forEach { XCTAssertEqual(65_536, try mod.constant(version: $0)) }

XCTAssertThrowsError(try mod.constant(version: 11)) { error in
guard case let .wasm3Error(msg) = error as? WasmInterpreterError
Expand All @@ -19,7 +19,7 @@ final class WasmInterpreterTests: XCTestCase {
XCTAssertEqual(0, try mod.add(-1, 1))
XCTAssertEqual(0, try mod.add(0, 0))
XCTAssertEqual(3, try mod.add(1, 2))
XCTAssertEqual(910_861, try mod.add(13425, 897_436))
XCTAssertEqual(910_861, try mod.add(13_425, 897_436))
}

func testPassingAndReturning64BitValues() throws {
Expand All @@ -28,7 +28,7 @@ final class WasmInterpreterTests: XCTestCase {
XCTAssertEqual(1, try mod.calculateValue(at: 1))
XCTAssertEqual(1, try mod.calculateValue(at: 2))
XCTAssertEqual(5, try mod.calculateValue(at: 5))
XCTAssertEqual(75025, try mod.calculateValue(at: 25))
XCTAssertEqual(75_025, try mod.calculateValue(at: 25))
}

func testUsingImportedFunction() throws {
Expand Down Expand Up @@ -63,7 +63,7 @@ final class WasmInterpreterTests: XCTestCase {
try mod.write(fortyTwo, to: 1)
XCTAssertEqual(42, try mod.integers(at: 1, length: 1).first)

XCTAssertEqual(10753, try mod.integers(at: 0, length: 1).first)
XCTAssertEqual(10_753, try mod.integers(at: 0, length: 1).first)

let goodbye = "Goodbye!"
XCTAssertNoThrow(try mod.writeASCIICharacters(in: goodbye, to: 2))
Expand Down

0 comments on commit 3a69633

Please sign in to comment.