content: import 'package:scidart/scidart.dart';
  import 'package:scidart/src/numdart/numdart.dart';
  import 'package:test/test.dart';
  
  void main() {
    test('generate a kaiser window', () {
      var w = kaiser(51, 14);
  
      var wExpect = Array([
        7.72686684e-06,
        8.15094846e-05,
        3.26000767e-04,
        9.42588751e-04,
        2.26624847e-03,
        4.80567914e-03,
        9.27621459e-03,
        1.66164301e-02,
        2.79789657e-02,
        4.46873500e-02,
        6.81537432e-02,
        9.97574012e-02,
        1.40689805e-01,
        1.91778970e-01,
        2.53311387e-01,
        3.24874218e-01,
        4.05241756e-01,
        4.92328143e-01,
        5.83222700e-01,
        6.74315433e-01,
        7.61509399e-01,
        8.40504954e-01,
        9.07130390e-01,
        9.57685605e-01,
        9.89261639e-01,
        1.00000000e+00,
        9.89261639e-01,
        9.57685605e-01,
        9.07130390e-01,
        8.40504954e-01,
        7.61509399e-01,
        6.74315433e-01,
        5.83222700e-01,
        4.92328143e-01,
        4.05241756e-01,
        3.24874218e-01,
        2.53311387e-01,
        1.91778970e-01,
        1.40689805e-01,
        9.97574012e-02,
        6.81537432e-02,
        4.46873500e-02,
        2.79789657e-02,
        1.66164301e-02,
        9.27621459e-03,
        4.80567914e-03,
        2.26624847e-03,
        9.42588751e-04,
        3.26000767e-04,
        8.15094846e-05,
        7.72686684e-06
      ]);
  
      print(w);
      print(wExpect);
  
      var fractionDigits = 4;
  
      arrayTruncateEachElement(w, fractionDigits);
      arrayTruncateEachElement(wExpect, fractionDigits);
  
      print(w);
      print(wExpect);
  
      expect(w, wExpect);
    });
  
    test('generate a kaiser asym', () {
      var w = kaiser(51, 14, sym: false);
  
      print(w);
  
      var wExpect = Array([
        7.72686684e-06,
        7.89004917e-05,
        3.11090555e-04,
        8.90767354e-04,
        2.12632237e-03,
        4.48460808e-03,
        8.62151296e-03,
        1.53987263e-02,
        2.58784008e-02,
        4.12883454e-02,
        6.29528693e-02,
        9.21883833e-02,
        1.30167987e-01,
        1.77764890e-01,
        2.35389766e-01,
        3.02841142e-01,
        3.79189708e-01,
        4.62716498e-01,
        5.50920935e-01,
        6.40607907e-01,
        7.28054195e-01,
        8.09244679e-01,
        8.80159218e-01,
        9.37083395e-01,
        9.76911564e-01,
        9.97409820e-01,
        9.97409820e-01,
        9.76911564e-01,
        9.37083395e-01,
        8.80159218e-01,
        8.09244679e-01,
        7.28054195e-01,
        6.40607907e-01,
        5.50920935e-01,
        4.62716498e-01,
        3.79189708e-01,
        3.02841142e-01,
        2.35389766e-01,
        1.77764890e-01,
        1.30167987e-01,
        9.21883833e-02,
        6.29528693e-02,
        4.12883454e-02,
        2.58784008e-02,
        1.53987263e-02,
        8.62151296e-03,
        4.48460808e-03,
        2.12632237e-03,
        8.90767354e-04,
        3.11090555e-04,
        7.89004917e-05
      ]);
  
      var fractionDigits = 4;
  
      expect(
          arrayTruncateEachElement(w, fractionDigits, returnNewArray: true),
          arrayTruncateEachElement(wExpect, fractionDigits,
              returnNewArray: true));
    });
  }
  