diff --git a/libcelt/tests/rotation-test.c b/libcelt/tests/rotation-test.c
index 08b43443bec21087da955177b7d073b808dff858..1b9ee9fc9a2ec6d42ae091b959982ab2a22d75a5 100644
--- a/libcelt/tests/rotation-test.c
+++ b/libcelt/tests/rotation-test.c
@@ -2,9 +2,16 @@
 #include "config.h"
 #endif
 
+#define CELT_C
+
 #include <stdio.h>
 #include <stdlib.h>
-#include "celt_types.h"
+#include "vq.c"
+#include "cwrs.c"
+#include "entcode.c"
+#include "entenc.c"
+#include "entdec.c"
+#include "mathops.c"
 #include "bands.h"
 #include <math.h>
 #define MAX_SIZE 100
@@ -19,7 +26,7 @@ void test_rotation(int N, int K)
    int nb_rotations = (N+4*K)/(8*K);
    for (i=0;i<N;i++)
       x1[i] = x0[i] = rand()%32767-16384;
-   exp_rotation(x1, N, 1, 1, nb_rotations);
+   exp_rotation(x1, N, 1, 1, K, SPREAD_NORMAL);
    for (i=0;i<N;i++)
    {
       err += (x0[i]-(double)x1[i])*(x0[i]-(double)x1[i]);
@@ -27,7 +34,7 @@ void test_rotation(int N, int K)
    }
    snr0 = 20*log10(ener/err);
    err = ener = 0;
-   exp_rotation(x1, N, -1, 1, nb_rotations);
+   exp_rotation(x1, N, -1, 1, K, SPREAD_NORMAL);
    for (i=0;i<N;i++)
    {
       err += (x0[i]-(double)x1[i])*(x0[i]-(double)x1[i]);
@@ -36,11 +43,15 @@ void test_rotation(int N, int K)
    snr = 20*log10(ener/err);
    printf ("SNR for size %d (%d pulses) is %f (was %f without inverse)\n", N, K, snr, snr0);
    if (snr < 60 || snr0 > 20)
+   {
+      fprintf(stderr, "FAIL!\n");
       ret = 1;
+   }
 }
 
 int main(void)
 {
+   ALLOC_STACK;
    test_rotation(15, 3);
    test_rotation(23, 5);
    test_rotation(50, 3);
diff --git a/libcelt/tests/type-test.c b/libcelt/tests/type-test.c
index 02e57f7bf8df36da985116feecfe576263df085a..1c3357e993808abb7d6d4702aec3bcfd09e0a097 100644
--- a/libcelt/tests/type-test.c
+++ b/libcelt/tests/type-test.c
@@ -2,7 +2,7 @@
 #include "config.h"
 #endif
 
-#include "celt_types.h"
+#include "opus_types.h"
 #include <stdio.h>
 
 int main(void)
@@ -11,7 +11,7 @@ int main(void)
    i <<= 14;
    if (i>>14 != 1)
    {
-      fprintf(stderr, "celt_int16 isn't 16 bits\n");
+      fprintf(stderr, "opus_int16 isn't 16 bits\n");
       return 1;
    }
    if (sizeof(opus_int16)*2 != sizeof(opus_int32))