@@ -508,7 +508,7 @@ describe('43. plsqlBindIndexedTable1.js', function() {
508508 function ( err , result ) {
509509 should . exist ( err ) ;
510510 ( err . message ) . should . startWith ( 'NJS-037:' ) ;
511- // NJS-037: incompatible type of value provided.
511+ // NJS-037: invalid data type at array index %d for bind \"%s\"
512512 should . not . exist ( result ) ;
513513 done ( ) ;
514514 }
@@ -525,7 +525,7 @@ describe('43. plsqlBindIndexedTable1.js', function() {
525525 function ( err , result ) {
526526 should . exist ( err ) ;
527527 ( err . message ) . should . startWith ( 'NJS-037:' ) ;
528- // NJS-037: incompatible type of value provided.
528+ // NJS-037: NJS-037: invalid data type at array index %d for bind \"%s\"
529529 should . not . exist ( result ) ;
530530 done ( ) ;
531531 }
@@ -547,6 +547,40 @@ describe('43. plsqlBindIndexedTable1.js', function() {
547547 ) ;
548548 } ) ;
549549
550+ it ( '43.2.8 negative case: incorrect type of array elements - bind by pos1' ,
551+ function ( done ) {
552+ var bindvars = [ { type : oracledb . STRING , dir : oracledb . BIND_IN , val : [ 'hello' , 1 ] } ] ;
553+ connection . execute (
554+ "BEGIN nodb_plsqlbindpack21.test4 ( :1 ); END;" ,
555+ bindvars ,
556+ function ( err , result ) {
557+ should . exist ( err ) ;
558+ ( err . message ) . should . startWith ( 'NJS-052:' ) ;
559+ // NJS-052: invalid data type at array index %d for bind position %d
560+ should . not . exist ( result ) ;
561+ done ( ) ;
562+ }
563+ ) ;
564+ }
565+ ) ;
566+
567+ it ( '43.2.9 negative case: incorrect type of array elements - bind by pos2' ,
568+ function ( done ) {
569+ var bindvars = [ { type : oracledb . NUMBER , dir : oracledb . BIND_IN , val : [ 1 , 'hello' ] } ] ;
570+ connection . execute (
571+ "BEGIN nodb_plsqlbindpack21.test1 ( :p ) ; END;" ,
572+ bindvars ,
573+ function ( err , result ) {
574+ should . exist ( err ) ;
575+ ( err . message ) . should . startWith ( 'NJS-052:' ) ;
576+ // NJS-052: NJS-037: invalid data type at array index %d for bind \"%s\"
577+ should . not . exist ( result ) ;
578+ done ( ) ;
579+ }
580+ ) ;
581+ }
582+ ) ;
583+
550584 } ) ; // 43.2
551585
552586 describe ( '43.3 binding PL/SQL scalar' , function ( ) {
@@ -718,7 +752,7 @@ describe('43. plsqlBindIndexedTable1.js', function() {
718752 ] , done ) ;
719753 } ) ;
720754
721- it ( '43.3.4 binding PL/SQL scalar OUT by postion ' , function ( done ) {
755+ it ( '43.3.4 binding PL/SQL scalar OUT by position ' , function ( done ) {
722756 async . series ( [
723757 function ( callback ) {
724758 var proc = "CREATE OR REPLACE\n" +
0 commit comments