@@ -14,6 +14,26 @@ test('xreimZeroFilling over', () => {
1414 re : [ 0 , 1 , 2 , 3 , 0 , 0 ] ,
1515 im : [ 4 , 5 , 6 , 7 , 0 , 0 ] ,
1616 } ) ;
17+
18+ expect ( result . re ) . toBeInstanceOf ( Array ) ;
19+ expect ( result . im ) . toBeInstanceOf ( Array ) ;
20+ } ) ;
21+
22+ test ( 'xreimZeroFilling over with Float64' , ( ) => {
23+ const re = new Float64Array ( [ 0 , 1 , 2 , 3 ] ) ;
24+ const im = new Float64Array ( [ 4 , 5 , 6 , 7 ] ) ;
25+ const result = reimZeroFilling ( { re, im } , 6 ) ;
26+
27+ const newRe = Array . from ( result . re ) ;
28+ const newIm = Array . from ( result . im ) ;
29+
30+ expect ( { re : newRe , im : newIm } ) . toStrictEqual ( {
31+ re : [ 0 , 1 , 2 , 3 , 0 , 0 ] ,
32+ im : [ 4 , 5 , 6 , 7 , 0 , 0 ] ,
33+ } ) ;
34+
35+ expect ( result . re ) . toBeInstanceOf ( Float64Array ) ;
36+ expect ( result . im ) . toBeInstanceOf ( Float64Array ) ;
1737} ) ;
1838
1939test ( 'xreimZeroFilling equal' , ( ) => {
@@ -30,8 +50,8 @@ test('xreimZeroFilling equal', () => {
3050} ) ;
3151
3252test ( 'xreimZeroFilling under' , ( ) => {
33- const re = [ 0 , 1 , 2 , 3 ] ;
34- const im = [ 4 , 5 , 6 , 7 ] ;
53+ const re = new Float64Array ( [ 0 , 1 , 2 , 3 ] ) ;
54+ const im = new Float64Array ( [ 4 , 5 , 6 , 7 ] ) ;
3555 const result = reimZeroFilling ( { re, im } , 2 ) ;
3656 const newRe = Array . from ( result . re ) ;
3757 const newIm = Array . from ( result . im ) ;
0 commit comments