Stop requiring explicit bindtype specification for non-scalar references
[dbsrgits/DBIx-Class.git] / t / sqlmaker / bind_transport.t
index 2d33352..3097191 100644 (file)
@@ -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 {