@@ -519,7 +519,7 @@ test_type!(numrange_bigdecimal<PgRange<sqlx::types::BigDecimal>>(Postgres,
519
519
Bound :: Excluded ( "2.4" . parse:: <sqlx:: types:: BigDecimal >( ) . unwrap( ) ) ) )
520
520
) ) ;
521
521
522
- #[ cfg( any ( postgres_14 , postgres_15 ) ) ]
522
+ #[ cfg( not ( postgres = "13" ) ) ]
523
523
test_type ! ( cube<sqlx:: postgres:: types:: PgCube >( Postgres ,
524
524
"cube(2)" == sqlx:: postgres:: types:: PgCube :: Point ( 2. ) ,
525
525
"cube(2.1)" == sqlx:: postgres:: types:: PgCube :: Point ( 2.1 ) ,
@@ -530,51 +530,43 @@ test_type!(cube<sqlx::postgres::types::PgCube>(Postgres,
530
530
"cube(array[2,3,4],array[4,5,6])" == sqlx:: postgres:: types:: PgCube :: MultiDimension ( vec![ vec![ 2. , 3. , 4. ] , vec![ 4. , 5. , 6. ] ] ) ,
531
531
) ) ;
532
532
533
- #[ cfg( any ( postgres_14 , postgres_15 ) ) ]
533
+ #[ cfg( not ( postgres = "13" ) ) ]
534
534
test_type ! ( _cube<Vec <sqlx:: postgres:: types:: PgCube >>( Postgres ,
535
535
"array[cube(2),cube(2)]" == vec![ sqlx:: postgres:: types:: PgCube :: Point ( 2. ) , sqlx:: postgres:: types:: PgCube :: Point ( 2. ) ] ,
536
536
"array[cube(2.2,-3.4)]" == vec![ sqlx:: postgres:: types:: PgCube :: OneDimensionInterval ( 2.2 , -3.4 ) ] ,
537
537
) ) ;
538
538
539
- #[ cfg( any( postgres_12, postgres_13, postgres_14, postgres_15) ) ]
540
539
test_type ! ( point<sqlx:: postgres:: types:: PgPoint >( Postgres ,
541
540
"point(2.2,-3.4)" ~= sqlx:: postgres:: types:: PgPoint { x: 2.2 , y: -3.4 } ,
542
541
) ) ;
543
542
544
- #[ cfg( any( postgres_12, postgres_13, postgres_14, postgres_15) ) ]
545
543
test_type ! ( _point<Vec <sqlx:: postgres:: types:: PgPoint >>( Postgres ,
546
544
"array[point(2,3),point(2.1,3.4)]" @= vec![ sqlx:: postgres:: types:: PgPoint { x: 2. , y: 3. } , sqlx:: postgres:: types:: PgPoint { x: 2.1 , y: 3.4 } ] ,
547
545
"array[point(2.2,-3.4)]" @= vec![ sqlx:: postgres:: types:: PgPoint { x: 2.2 , y: -3.4 } ] ,
548
546
) ) ;
549
547
550
- #[ cfg( any( postgres_12, postgres_13, postgres_14, postgres_15) ) ]
551
548
test_type ! ( line<sqlx:: postgres:: types:: PgLine >( Postgres ,
552
549
"line('{1.1, -2.2, 3.3}')" == sqlx:: postgres:: types:: PgLine { a: 1.1 , b: -2.2 , c: 3.3 } ,
553
550
"line('((0.0, 0.0), (1.0,1.0))')" == sqlx:: postgres:: types:: PgLine { a: 1. , b: -1. , c: 0. } ,
554
551
) ) ;
555
552
556
- #[ cfg( any( postgres_12, postgres_13, postgres_14, postgres_15) ) ]
557
553
test_type ! ( lseg<sqlx:: postgres:: types:: PgLSeg >( Postgres ,
558
554
"lseg('((1.0, 2.0), (3.0,4.0))')" == sqlx:: postgres:: types:: PgLSeg { start_x: 1. , start_y: 2. , end_x: 3. , end_y: 4. } ,
559
555
) ) ;
560
556
561
- #[ cfg( any( postgres_12, postgres_13, postgres_14, postgres_15) ) ]
562
557
test_type ! ( box<sqlx:: postgres:: types:: PgBox >( Postgres ,
563
558
"box('((1.0, 2.0), (3.0,4.0))')" == sqlx:: postgres:: types:: PgBox { upper_right_x: 3. , upper_right_y: 4. , lower_left_x: 1. , lower_left_y: 2. } ,
564
559
) ) ;
565
560
566
- #[ cfg( any( postgres_12, postgres_13, postgres_14, postgres_15) ) ]
567
561
test_type ! ( _box<Vec <sqlx:: postgres:: types:: PgBox >>( Postgres ,
568
562
"array[box('1,2,3,4'),box('((1.1, 2.2), (3.3, 4.4))')]" @= vec![ sqlx:: postgres:: types:: PgBox { upper_right_x: 3. , upper_right_y: 4. , lower_left_x: 1. , lower_left_y: 2. } , sqlx:: postgres:: types:: PgBox { upper_right_x: 3.3 , upper_right_y: 4.4 , lower_left_x: 1.1 , lower_left_y: 2.2 } ] ,
569
563
) ) ;
570
564
571
- #[ cfg( any( postgres_12, postgres_13, postgres_14, postgres_15) ) ]
572
565
test_type ! ( path<sqlx:: postgres:: types:: PgPath >( Postgres ,
573
566
"path('((1.0, 2.0), (3.0,4.0))')" == sqlx:: postgres:: types:: PgPath { closed: true , points: vec![ sqlx:: postgres:: types:: PgPoint { x: 1. , y: 2. } , sqlx:: postgres:: types:: PgPoint { x: 3. , y: 4. } ] } ,
574
567
"path('[(1.0, 2.0), (3.0,4.0)]')" == sqlx:: postgres:: types:: PgPath { closed: false , points: vec![ sqlx:: postgres:: types:: PgPoint { x: 1. , y: 2. } , sqlx:: postgres:: types:: PgPoint { x: 3. , y: 4. } ] } ,
575
568
) ) ;
576
569
577
- #[ cfg( any( postgres_12, postgres_13, postgres_14, postgres_15) ) ]
578
570
test_type ! ( polygon<sqlx:: postgres:: types:: PgPolygon >( Postgres ,
579
571
"polygon('((-2,-3),(-1,-3),(-1,-1),(1,1),(1,3),(2,3),(2,-3),(1,-3),(1,0),(-1,0),(-1,-2),(-2,-2))')" ~= sqlx:: postgres:: types:: PgPolygon { points: vec![
580
572
sqlx:: postgres:: types:: PgPoint { x: -2. , y: -3. } , sqlx:: postgres:: types:: PgPoint { x: -1. , y: -3. } , sqlx:: postgres:: types:: PgPoint { x: -1. , y: -1. } , sqlx:: postgres:: types:: PgPoint { x: 1. , y: 1. } ,
@@ -583,7 +575,6 @@ test_type!(polygon<sqlx::postgres::types::PgPolygon>(Postgres,
583
575
] } ,
584
576
) ) ;
585
577
586
- #[ cfg( any( postgres_12, postgres_13, postgres_14, postgres_15) ) ]
587
578
test_type ! ( circle<sqlx:: postgres:: types:: PgCircle >( Postgres ,
588
579
"circle('<(1.1, -2.2), 3.3>')" ~= sqlx:: postgres:: types:: PgCircle { x: 1.1 , y: -2.2 , radius: 3.3 } ,
589
580
"circle('((1.1, -2.2), 3.3)')" ~= sqlx:: postgres:: types:: PgCircle { x: 1.1 , y: -2.2 , radius: 3.3 } ,
@@ -678,17 +669,11 @@ test_prepared_type!(citext_array<Vec<PgCiText>>(Postgres,
678
669
] ,
679
670
) ) ;
680
671
681
- // FIXME: needed to disable `ltree` tests in version that don't have a binary format for it
682
- // but `PgLTree` should just fall back to text format
683
- #[ cfg( any( postgres_14, postgres_15) ) ]
684
672
test_type ! ( ltree<sqlx:: postgres:: types:: PgLTree >( Postgres ,
685
673
"'Foo.Bar.Baz.Quux'::ltree" == sqlx:: postgres:: types:: PgLTree :: from_str( "Foo.Bar.Baz.Quux" ) . unwrap( ) ,
686
674
"'Alpha.Beta.Delta.Gamma'::ltree" == sqlx:: postgres:: types:: PgLTree :: try_from_iter( [ "Alpha" , "Beta" , "Delta" , "Gamma" ] ) . unwrap( ) ,
687
675
) ) ;
688
676
689
- // FIXME: needed to disable `ltree` tests in version that don't have a binary format for it
690
- // but `PgLTree` should just fall back to text format
691
- #[ cfg( any( postgres_14, postgres_15) ) ]
692
677
test_type ! ( ltree_vec<Vec <sqlx:: postgres:: types:: PgLTree >>( Postgres ,
693
678
"array['Foo.Bar.Baz.Quux', 'Alpha.Beta.Delta.Gamma']::ltree[]" ==
694
679
vec![
0 commit comments