@@ -0,0 +1,850 @@
+package com.github.davidmoten.ar;%0A%0Aimport static org.junit.Assert.assertEquals;%0A%0Aimport org.junit.Test;%0A%0Apublic class FFTTest %7B%0A%0A%09private static final double PRECISION = 0.00000001;%0A%0A%09@Test%0A%09public void testFft() %7B%0A%09%09double%5B%5D values = new double%5B%5D %7B -0.0348042583933070,%0A%09%09%09%090.07910192950176387, 0.7233322451735928, 0.1659819820667019 %7D;%0A%09%09Complex%5B%5D a = Complex.toComplex(values);%0A%09%09Complex%5B%5D b = FFT.fft(a);%0A%09%09assertEquals(0.9336118983487516, b%5B0%5D.re(), PRECISION);%0A%09%09assertEquals(0, b%5B0%5D.im(), PRECISION);%0A%09%09assertEquals(-0.7581365035668999, b%5B1%5D.re(), PRECISION);%0A%09%09assertEquals(0.08688005256493803, b%5B1%5D.im(), PRECISION);%0A%09%09assertEquals(0.44344407521182005, b%5B2%5D.re(), PRECISION);%0A%09%09assertEquals(0, b%5B2%5D.im(), PRECISION);%0A%09%09assertEquals(-0.7581365035668999, b%5B3%5D.re(), PRECISION);%0A%09%09assertEquals(-0.08688005256493803, b%5B3%5D.im(), PRECISION);%0A%09%7D%0A%7D%0A

add tests