File tree Expand file tree Collapse file tree 1 file changed +33
-0
lines changed 
lib/node_modules/@stdlib/ndarray/fill-slice/test Expand file tree Collapse file tree 1 file changed +33
-0
lines changed Original file line number Diff line number Diff line change @@ -88,6 +88,39 @@ tape( 'the function throws an error if provided a first argument which is a read
8888	} 
8989} ) ; 
9090
91+ tape (  'the function throws an error if provided a second argument which is not a `MultiSlice` instance' ,  function  test (  t  )  { 
92+ 	var  values ; 
93+ 	var  i ; 
94+ 	var  x ; 
95+ 
96+ 	x  =  scalar2ndarray (  0.0 ,  { 
97+ 		'dtype' : 'float64' 
98+ 	} ) ; 
99+ 
100+ 	values  =  [ 
101+ 		'5' , 
102+ 		5 , 
103+ 		NaN , 
104+ 		true , 
105+ 		false , 
106+ 		null , 
107+ 		void  0 , 
108+ 		[ ] , 
109+ 		{ } , 
110+ 		function  noop ( )  { } 
111+ 	] ; 
112+ 	for  (  i  =  0 ;  i  <  values . length ;  i ++  )  { 
113+ 		t . throws (  badValue (  values [  i  ]  ) ,  TypeError ,  'throws an error when provided '  +  values [  i  ]  ) ; 
114+ 	} 
115+ 	t . end ( ) ; 
116+ 
117+ 	function  badValue (  value  )  { 
118+ 		return  function  badValue ( )  { 
119+ 			fillSlice (  x ,  value ,  10.0  ) ; 
120+ 		} ; 
121+ 	} 
122+ } ) ; 
123+ 
91124tape (  'the function throws an error if provided a third argument which cannot be safely cast to the input ndarray data type' ,  function  test (  t  )  { 
92125	var  values ; 
93126	var  x ; 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments