Skip to content

Commit cfaa356

Browse files
committed
Apply moon fmt formatting
1 parent 21bd059 commit cfaa356

1 file changed

Lines changed: 5 additions & 15 deletions

File tree

src/tests/integration_test.mbt

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -333,9 +333,7 @@ async test "UTF-8 text round-trip via parameters and row decoding" {
333333
async test "error handling: invalid SQL" {
334334
let client = @pgsql.Client::connect(get_config())
335335
let mut got_error = false
336-
try {
337-
ignore((client.query("SELCT invalid syntax") : @pgsql.QueryResult))
338-
} catch {
336+
ignore((client.query("SELCT invalid syntax") : @pgsql.QueryResult)) catch {
339337
_ => got_error = true
340338
}
341339
assert_true(got_error)
@@ -402,9 +400,7 @@ async test "prepared statement: use after close raises error" {
402400
stmt.close()
403401

404402
let mut got_error = false
405-
try {
406-
ignore((stmt.query([@pgsql.Int(1)]) : @pgsql.QueryResult))
407-
} catch {
403+
ignore((stmt.query([@pgsql.Int(1)]) : @pgsql.QueryResult)) catch {
408404
@pgsql.PreparedStmtError(_) => got_error = true
409405
_ => ()
410406
}
@@ -528,9 +524,7 @@ async test "transaction: TxError on inactive transaction" {
528524

529525
// Now operations on the inactive transaction should raise TxError
530526
let mut got_error = false
531-
try {
532-
ignore((tx.execute("SELECT 1") : Int))
533-
} catch {
527+
ignore((tx.execute("SELECT 1") : Int)) catch {
534528
@pgsql.TxError(_) => got_error = true
535529
_ => ()
536530
}
@@ -551,9 +545,7 @@ async test "client: query after close raises error" {
551545

552546
// Operations on a closed client should raise an error
553547
let mut got_error = false
554-
try {
555-
ignore((client.query("SELECT 1") : @pgsql.QueryResult))
556-
} catch {
548+
ignore((client.query("SELECT 1") : @pgsql.QueryResult)) catch {
557549
_ => got_error = true
558550
}
559551
assert_true(got_error)
@@ -1149,9 +1141,7 @@ async test "stream: invalid batch_size rejected" {
11491141
let client = @pgsql.Client::connect(get_config())
11501142

11511143
let mut got_error = false
1152-
try {
1153-
ignore((client.query_stream("SELECT 1", batch_size=0) : @pgsql.RowStream))
1154-
} catch {
1144+
ignore((client.query_stream("SELECT 1", batch_size=0) : @pgsql.RowStream)) catch {
11551145
@pgsql.StreamError(msg) => got_error = msg.contains("batch_size")
11561146
_ => ()
11571147
}

0 commit comments

Comments
 (0)