X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Fsqlmaker%2Fbind_transport.t;h=30971914d047dbe0d6ff4ce07c0e3f2a62223e76;hb=e407b4ac86ccfbd6e721d459c04561899a701bac;hp=2d33352fe7a2836dea105c6281b876a719c7cabc;hpb=f21ae8f77062762fc2d9aef89242b59f27172b3c;p=dbsrgits%2FDBIx-Class.git diff --git a/t/sqlmaker/bind_transport.t b/t/sqlmaker/bind_transport.t index 2d33352..3097191 100644 --- a/t/sqlmaker/bind_transport.t +++ b/t/sqlmaker/bind_transport.t @@ -103,45 +103,30 @@ shorthand_check( 'stringifyable $object === [ {}, $object ]', ); -throws_ok { - shorthand_check( +shorthand_check( [ 2 ], - [], - ) -} qr !You must supply a datatype/bindtype .+ for non-scalar value \Q[ 2 ]!, - 'exception on bare array bindvalue'; + [ {} => [ 2 ] ], +); -throws_ok { - shorthand_check( +shorthand_check( [ {} => [ 2 ] ], - [], - ) -} qr !You must supply a datatype/bindtype .+ for non-scalar value \Q[ 2 ]!, - 'exception on untyped array bindvalue'; + [ {} => [ 2 ] ], +); -throws_ok { - shorthand_check( +shorthand_check( [ {}, 2, 3 ], - [], - ) -} qr !You must supply a datatype/bindtype .+ for non-scalar value \[ 'HASH\(\w+\)', 2, 3 \]!, - 'exception on bare multielement array bindvalue'; + [ {} => [ {}, 2, 3 ] ], +); -throws_ok { - shorthand_check( +shorthand_check( bless( {}, 'Foo'), - [], - ) -} qr !You must supply a datatype/bindtype .+ for non-scalar value \Qbless( {}, 'Foo' )!, - 'exception on bare object'; + [ {} => bless( {}, 'Foo') ], +); -throws_ok { - shorthand_check( +shorthand_check( + [ {}, bless( {}, 'Foo') ], [ {}, bless( {}, 'Foo') ], - [], - ) -} qr !You must supply a datatype/bindtype .+ for non-scalar value \Qbless( {}, 'Foo' )!, - 'exception on untyped object'; +); sub shorthand_check {