Fix more stack overflows in test cases on AVR.

printf() strings go into ram on AVR, move most
tests to use the common logic in unittests.h that
only prints line numbers on AVR.
diff --git a/tests/backwards_compatibility/decode_legacy.c b/tests/backwards_compatibility/decode_legacy.c
index 5f5b6bb..ed61c56 100644
--- a/tests/backwards_compatibility/decode_legacy.c
+++ b/tests/backwards_compatibility/decode_legacy.c
@@ -12,17 +12,14 @@
 #include <pb_decode.h>
 #include "alltypes_legacy.h"
 #include "test_helpers.h"
-
-#define TEST(x) if (!(x)) { \
-    printf("Test " #x " failed.\n"); \
-    return false; \
-    }
+#include "unittests.h"
 
 /* This function is called once from main(), it handles
    the decoding and checks the fields. */
 bool check_alltypes(pb_istream_t *stream, int mode)
 {
     AllTypes alltypes = {0};
+    int status = 0;
     
     if (!pb_decode(stream, AllTypes_fields, &alltypes))
         return false;
@@ -169,7 +166,7 @@
     
     TEST(alltypes.end == 1099);
     
-    return true;
+    return status == 0;
 }
 
 int main(int argc, char **argv)
diff --git a/tests/common/unittests.h b/tests/common/unittests.h
index 6724fed..43609ed 100644
--- a/tests/common/unittests.h
+++ b/tests/common/unittests.h
@@ -15,14 +15,12 @@
 
 /* Elaborate debug messages for normal development */
 #define COMMENT(x) printf("\n----" x "----\n");
-#define STR(x) #x
-#define STR2(x) STR(x)
 #define TEST(x) \
     if (!(x)) { \
-        fprintf(stderr, "\033[31;1mFAILED:\033[22;39m " __FILE__ ":" STR2(__LINE__) " " #x "\n"); \
+        fprintf(stderr, "\033[31;1mFAILED:\033[22;39m %s:%d %s\n", __FILE__, __LINE__, #x); \
         status = 1; \
     } else { \
-        printf("\033[32;1mOK:\033[22;39m " #x "\n"); \
+        printf("\033[32;1mOK:\033[22;39m %s\n", #x); \
     }
 #endif
 
diff --git a/tests/extensions/decode_extensions.c b/tests/extensions/decode_extensions.c
index 22de651..591f9e3 100644
--- a/tests/extensions/decode_extensions.c
+++ b/tests/extensions/decode_extensions.c
@@ -7,17 +7,14 @@
 #include "alltypes.pb.h"
 #include "extensions.pb.h"
 #include "test_helpers.h"
-
-#define TEST(x) if (!(x)) { \
-    printf("Test " #x " failed.\n"); \
-    return 2; \
-    }
+#include "unittests.h"
 
 int main(int argc, char **argv)
 {
     uint8_t buffer[1024];
     size_t count;
     pb_istream_t stream;
+    int status = 0;
     
     AllTypes alltypes = AllTypes_init_zero;
     int32_t extensionfield1;
@@ -55,6 +52,6 @@
     TEST(strcmp(extensionfield2.test1, "test") == 0)
     TEST(extensionfield2.test2 == 54321)
     
-    return 0;
+    return status;
 }
 
diff --git a/tests/field_size_16_proto3/decode_alltypes.c b/tests/field_size_16_proto3/decode_alltypes.c
index 79606fb..ab3c9a3 100644
--- a/tests/field_size_16_proto3/decode_alltypes.c
+++ b/tests/field_size_16_proto3/decode_alltypes.c
@@ -9,17 +9,14 @@
 #include <pb_decode.h>
 #include "alltypes.pb.h"
 #include "test_helpers.h"
-
-#define TEST(x) if (!(x)) { \
-    printf("Test " #x " failed.\n"); \
-    return false; \
-    }
+#include "unittests.h"
 
 /* This function is called once from main(), it handles
    the decoding and checks the fields. */
 bool check_alltypes(pb_istream_t *stream, int mode)
 {
     AllTypes alltypes = AllTypes_init_zero;
+    int status = 0;
 
     /* Fill with garbage to better detect initialization errors */
     memset(&alltypes, 0xAA, sizeof(alltypes));
@@ -139,7 +136,7 @@
 
     TEST(alltypes.end == 1099);
 
-    return true;
+    return status == 0;
 }
 
 int main(int argc, char **argv)
diff --git a/tests/without_64bit/decode_alltypes.c b/tests/without_64bit/decode_alltypes.c
index 6b5ff8e..a75fc34 100644
--- a/tests/without_64bit/decode_alltypes.c
+++ b/tests/without_64bit/decode_alltypes.c
@@ -9,11 +9,7 @@
 #include <pb_decode.h>
 #include "alltypes.pb.h"
 #include "test_helpers.h"
-
-#define TEST(x) if (!(x)) { \
-    printf("Test " #x " failed.\n"); \
-    return false; \
-    }
+#include "unittests.h"
 
 /* This function is called once from main(), it handles
    the decoding and checks the fields. */
@@ -21,6 +17,7 @@
 {
     /* Uses _init_default to just make sure that it works. */
     AllTypes alltypes = AllTypes_init_default;
+    int status = 0;
     
     /* Fill with garbage to better detect initialization errors */
     memset(&alltypes, 0xAA, sizeof(alltypes));
@@ -155,7 +152,7 @@
     
     TEST(alltypes.end == 1099);
     
-    return true;
+    return status == 0;
 }
 
 int main(int argc, char **argv)