Skip to content

Commit 26f26d1

Browse files
committed
should_fail -> should_panic
1 parent 62fd28f commit 26f26d1

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

tests/test.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -281,15 +281,15 @@ fn test_nested_transactions_finish() {
281281
}
282282

283283
#[test]
284-
#[should_fail(expected = "active transaction")]
284+
#[should_panic(expected = "active transaction")]
285285
fn test_conn_trans_when_nested() {
286286
let conn = or_panic!(Connection::connect("postgres://postgres@localhost", &SslMode::None));
287287
let _trans = or_panic!(conn.transaction());
288288
conn.transaction().unwrap();
289289
}
290290

291291
#[test]
292-
#[should_fail(expected = "active transaction")]
292+
#[should_panic(expected = "active transaction")]
293293
fn test_trans_with_nested_trans() {
294294
let conn = or_panic!(Connection::connect("postgres://postgres@localhost", &SslMode::None));
295295
let trans = or_panic!(conn.transaction());
@@ -405,7 +405,7 @@ fn test_lazy_query() {
405405
}
406406

407407
#[test]
408-
#[should_fail(expected = "same `Connection` as")]
408+
#[should_panic(expected = "same `Connection` as")]
409409
fn test_lazy_query_wrong_conn() {
410410
let conn1 = or_panic!(Connection::connect("postgres://postgres@localhost", &SslMode::None));
411411
let conn2 = or_panic!(Connection::connect("postgres://postgres@localhost", &SslMode::None));
@@ -457,14 +457,14 @@ fn test_wrong_param_type() {
457457
}
458458

459459
#[test]
460-
#[should_fail(expected = "expected 2 parameters but got 1")]
460+
#[should_panic(expected = "expected 2 parameters but got 1")]
461461
fn test_too_few_params() {
462462
let conn = or_panic!(Connection::connect("postgres://postgres@localhost", &SslMode::None));
463463
let _ = conn.execute("SELECT $1::INT, $2::INT", &[&1i32]);
464464
}
465465

466466
#[test]
467-
#[should_fail(expected = "expected 2 parameters but got 3")]
467+
#[should_panic(expected = "expected 2 parameters but got 3")]
468468
fn test_too_many_params() {
469469
let conn = or_panic!(Connection::connect("postgres://postgres@localhost", &SslMode::None));
470470
let _ = conn.execute("SELECT $1::INT, $2::INT", &[&1i32, &2i32, &3i32]);
@@ -480,7 +480,7 @@ fn test_index_named() {
480480
}
481481

482482
#[test]
483-
#[should_fail]
483+
#[should_panic]
484484
fn test_index_named_fail() {
485485
let conn = or_panic!(Connection::connect("postgres://postgres@localhost", &SslMode::None));
486486
let stmt = or_panic!(conn.prepare("SELECT 10::INT as id"));

0 commit comments

Comments
 (0)