test: Remove 30-test.i indirection.

* include/30-test.i: Remove.
* scaffold/tests/30-strlen.c: Remove 30-test.i indirection.
* scaffold/tests/31-eputs.c: Likewise.
* scaffold/tests/32-compare.c: Likewise.
* scaffold/tests/33-and-or.c: Likewise.
* scaffold/tests/34-pre-post.c: Likewise.
* scaffold/tests/35-compare-char.c: Likewise.
* scaffold/tests/36-compare-arithmetic.c: Likewise.
* scaffold/tests/37-compare-assign.c: Likewise.
* scaffold/tests/38-compare-call.c: Likewise.
* scaffold/tests/40-if-else.c: Likewise.
* scaffold/tests/41-?.c: Likewise.
* scaffold/tests/42-goto-label.c: Likewise.
* scaffold/tests/43-for-do-while.c: Likewise.
* scaffold/tests/44-switch.c: Likewise.
* scaffold/tests/45-void-call.c: Likewise.
* scaffold/tests/46-function-static.c: Likewise.
* scaffold/tests/50-assert.c: Likewise.
* scaffold/tests/51-strcmp.c: Likewise.
* scaffold/tests/52-itoa.c: Likewise.
* scaffold/tests/53-strcpy.c: Likewise.
* scaffold/tests/60-math.c: Likewise.
* scaffold/tests/63-struct-cell.c: Likewise.
* scaffold/tests/64-make-cell.c: Likewise.
* scaffold/tests/65-read.c: Likewise.
* scaffold/tests/66-local-char-array.c: Likewise.
* scaffold/tests/70-printf.c: Likewise.
* scaffold/tests/71-struct-array.c: Likewise.
* scaffold/tests/72-typedef-struct-def.c: Likewise.
* scaffold/tests/73-union.c: Likewise.
* scaffold/tests/74-multi-line-string.c: Likewise.
* scaffold/tests/75-struct-union.c: Likewise.
* scaffold/tests/76-pointer-arithmetic.c: Likewise.
* scaffold/tests/77-pointer-assign.c: Likewise.
* scaffold/tests/78-union-struct.c: Likewise.
* scaffold/tests/79-int-array.c: Likewise.
* scaffold/tests/7a-struct-char-array.c: Likewise.
* scaffold/tests/7b-struct-int-array.c: Likewise.
* scaffold/tests/7c-dynarray.c: Likewise.
* scaffold/tests/7d-cast-char.c: Likewise.
* scaffold/tests/7e-struct-array-access.c: Likewise.
* scaffold/tests/7f-struct-pointer-arithmetic.c: Likewise.
* scaffold/tests/7g-struct-byte-word-field.c: Likewise.
* scaffold/tests/7h-struct-assign.c: Likewise.
* scaffold/tests/7i-struct-struct.c: Likewise.
* scaffold/tests/7j-strtoull.c: Likewise.
* scaffold/tests/7k-for-each-elem.c: Likewise.
* scaffold/tests/7l-struct-any-size-array.c: Likewise.
* scaffold/tests/7m-struct-char-array-assign.c: Likewise.
* scaffold/tests/7n-struct-struct-array.c: Likewise.
* scaffold/tests/80-setjmp.c: Likewise.
* scaffold/tests/81-qsort.c: Likewise.
* scaffold/tests/86-strncpy.c: Likewise.
* scaffold/tests/87-sscanf.c: Likewise.
This commit is contained in:
Jan Nieuwenhuizen 2018-08-15 18:01:14 +02:00
parent 03e479e30a
commit 25047c7606
No known key found for this signature in database
GPG Key ID: F3C1A0D9C1D65273
53 changed files with 104 additions and 134 deletions

View File

@ -1,30 +0,0 @@
/* -*-comment-start: "//";comment-end:""-*-
* GNU Mes --- Maxwell Equations of Software
* Copyright © 2017 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
*
* This file is part of GNU Mes.
*
* GNU Mes is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or (at
* your option) any later version.
*
* GNU Mes is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
*/
#include <libmes.h>
int test ();
int
main ()
{
int r = test ();
return r;
}

View File

@ -18,10 +18,10 @@
* along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
*/
#include "30-test.i"
#include <libmes.h>
int
test ()
main ()
{
if (strlen ("mes") == 3) goto ok;
return 1;

View File

@ -18,11 +18,11 @@
* along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
*/
#include "30-test.i"
#include <libmes.h>
#include <stdio.h>
int
test ()
main ()
{
puts ("\n");
puts ("mes");

View File

@ -18,7 +18,7 @@
* along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
*/
#include "30-test.i"
#include <libmes.h>
#include <stdio.h>
int isid(char c) {
@ -26,7 +26,7 @@ int isid(char c) {
}
int
test ()
main ()
{
int f = 0;
int t = 1;

View File

@ -18,11 +18,11 @@
* along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
*/
#include "30-test.i"
#include <libmes.h>
#include <stdio.h>
int
test ()
main ()
{
int f = 0;
int t = 1;

View File

@ -18,11 +18,11 @@
* along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
*/
#include "30-test.i"
#include <libmes.h>
#include <stdio.h>
int
test ()
main ()
{
int f = 0;
int t = 1;

View File

@ -18,14 +18,14 @@
* along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
*/
#include "30-test.i"
#include <libmes.h>
#include <stdio.h>
char g_arena[10];
char *g_chars = g_arena;
int
test ()
main ()
{
int i = 0;
char c = 'C';

View File

@ -18,11 +18,11 @@
* along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
*/
#include "30-test.i"
#include <libmes.h>
#include <stdio.h>
int
test ()
main ()
{
puts ("\n");
puts ("t: 1 + 2\n");

View File

@ -18,11 +18,11 @@
* along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
*/
#include "30-test.i"
#include <libmes.h>
#include <stdio.h>
int
test ()
main ()
{
int f = 0;
int t = 1;

View File

@ -18,7 +18,7 @@
* along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
*/
#include "30-test.i"
#include <libmes.h>
#include <stdio.h>
#include <string.h>
@ -43,7 +43,7 @@ identity (int i)
}
int
test ()
main ()
{
int i = 0;
int f = 0;

View File

@ -18,11 +18,11 @@
* along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
*/
#include "30-test.i"
#include <libmes.h>
#include <stdio.h>
int
test ()
main ()
{
int i = 0;

View File

@ -18,7 +18,7 @@
* along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
*/
#include "30-test.i"
#include <libmes.h>
#include <stdio.h>
union foo
@ -27,7 +27,7 @@ union foo
};
int
test ()
main ()
{
int f;
int t = 1;

View File

@ -18,7 +18,7 @@
* along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
*/
#include "30-test.i"
#include <libmes.h>
#include <stdio.h>
int
@ -32,7 +32,7 @@ label (int c)
}
int
test ()
main ()
{
int f;
int t = 1;

View File

@ -18,11 +18,11 @@
* along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
*/
#include "30-test.i"
#include <libmes.h>
#include <stdio.h>
int
test ()
main ()
{
int i = 0;
int f = 0;

View File

@ -18,7 +18,7 @@
* along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
*/
#include "30-test.i"
#include <libmes.h>
#include <stdio.h>
enum type_t {TCHAR, TCLOSURE, TCONTINUATION, TFUNCTION, TKEYWORD, TMACRO, TNUMBER, TPAIR, TREF, TSPECIAL, TSTRING, TSYMBOL, TVALUES, TVECTOR, TBROKEN_HEART};
@ -88,7 +88,7 @@ default_first (int c)
}
int
test ()
main ()
{
puts ("\n");
puts ("t: switch 0\n");

View File

@ -18,7 +18,7 @@
* along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
*/
#include "30-test.i"
#include <libmes.h>
#include <stdio.h>
void
@ -27,7 +27,7 @@ void_func ()
}
int
test ()
main ()
{
puts ("\n");
puts ("void_func ()\n");

View File

@ -18,12 +18,12 @@
* along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
*/
#include "30-test.i"
#include <libmes.h>
#include <assert.h>
#include <stdio.h>
int
test ()
main ()
{
int f;

View File

@ -18,7 +18,7 @@
* along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
*/
#include "30-test.i"
#include <libmes.h>
#include <assert.h>
#include <stdio.h>
#include <string.h>
@ -40,7 +40,7 @@ strncmp (char const* a, char const* b, size_t size)
#endif
int
test ()
main ()
{
char *p = "mes";

View File

@ -18,13 +18,13 @@
* along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
*/
#include "30-test.i"
#include <libmes.h>
#include <libmes.h>
#include <stdlib.h>
#include <string.h>
int
test ()
main ()
{
char *p = "mes";

View File

@ -18,12 +18,12 @@
* along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
*/
#include "30-test.i"
#include <libmes.h>
#include <stdio.h>
#include <string.h>
int
test ()
main ()
{
puts ("\n");
puts ("t: strcpy (buf, \"mes\")\n");

View File

@ -22,7 +22,7 @@
#include <stdio.h>
#include <string.h>
#include "30-test.i"
#include <libmes.h>
int
add (int a, int b)
@ -37,7 +37,7 @@ inc (int i)
}
int
test ()
main ()
{
int i;

View File

@ -18,7 +18,7 @@
* along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
*/
#include "30-test.i"
#include <libmes.h>
// #include <stdio.h>
#include <stdlib.h>
@ -88,7 +88,7 @@ int g_function = 0;
int
test ()
main ()
{
// puts ("\n");
// puts ("t: g_cells[0] = g_cells[1]\n");

View File

@ -18,7 +18,7 @@
* along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
*/
#include "30-test.i"
#include <libmes.h>
#include <stdio.h>
#include <stdlib.h>
@ -120,7 +120,7 @@ make_tmps_test (struct scm* cells)
}
int
test ()
main ()
{
puts ("\n");
make_tmps_test (g_cells);

View File

@ -18,7 +18,7 @@
* along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
*/
#include "30-test.i"
#include <libmes.h>
#include <stdio.h>
#include <stdlib.h>
@ -48,7 +48,7 @@ get ()
}
int
test ()
main ()
{
char *p = (char*)g_chars;
int i = 0;

View File

@ -18,7 +18,7 @@
* along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
*/
#include "30-test.i"
#include <libmes.h>
#include <stdlib.h>
#include <stdio.h>
@ -81,7 +81,7 @@ char* LittleEndian(unsigned value, char* c, int Number_of_bytes)
}
int
test ()
main ()
{
char table[3] = {'0', '1', '2'};

View File

@ -18,13 +18,13 @@
* along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
*/
#include "30-test.i"
#include <libmes.h>
#include <stdio.h>
#include <string.h>
#include <stdarg.h>
int
test ()
main ()
{
char *s = "mes";
char c = 'm';

View File

@ -18,7 +18,7 @@
* along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
*/
#include "30-test.i"
#include <libmes.h>
#include <stdio.h>
#include <string.h>
@ -49,7 +49,7 @@ typedef struct baz
} baz;
int
test ()
main ()
{
foo_struct f;
f.bar[0] = 0x22;

View File

@ -18,7 +18,7 @@
* along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
*/
#include "30-test.i"
#include <libmes.h>
#include <stdio.h>
typedef struct foo
@ -47,7 +47,7 @@ bar *list[2];
#endif
int
test ()
main ()
{
foo f = {1};
printf ("f.i=%d\n", f.i);

View File

@ -18,7 +18,7 @@
* along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
*/
#include "30-test.i"
#include <libmes.h>
#include <stdio.h>
typedef union foo
@ -37,7 +37,7 @@ typedef union
int
test ()
main ()
{
union foo f = {48};
printf ("f.i=%d\n", f.i);

View File

@ -18,7 +18,7 @@
* along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
*/
#include "30-test.i"
#include <libmes.h>
#include <stdio.h>
#include <string.h>
@ -32,7 +32,7 @@ int global_i = 1;
int *global_p = &global_i;
int
test ()
main ()
{
if (printf ("belong to us\n"), strcmp (help, "All your base are")) return 1;

View File

@ -18,7 +18,7 @@
* along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
*/
#include "30-test.i"
#include <libmes.h>
#include <stdio.h>
union u {
@ -41,7 +41,7 @@ struct anon
int
test ()
main ()
{
struct foo f = {2};
printf ("f.u.bar=%d\n", f.u.bar);

View File

@ -18,7 +18,7 @@
* along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
*/
#include "30-test.i"
#include <libmes.h>
#include <stdio.h>
char *list[2] = {"foo\n", "bar\n"};
@ -31,7 +31,7 @@ struct foo {
};
int
test ()
main ()
{
char *pc = 0;
void *pv = 0;

View File

@ -20,7 +20,7 @@
#include <string.h>
#include "30-test.i"
#include <libmes.h>
struct baz {
int i;
@ -58,7 +58,7 @@ add2 (void *ptab)
struct foo *hash_ident[10];
int
test ()
main ()
{
int i = 1;
int *p = &i;

View File

@ -18,7 +18,7 @@
* along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
*/
#include "30-test.i"
#include <libmes.h>
#include <stdint.h>
@ -34,7 +34,7 @@ union bar {
union bar bar;
int
test ()
main ()
{
bar.foo.i = 2;
bar.foo.p = "hallo";

View File

@ -18,7 +18,7 @@
* along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
*/
#include "30-test.i"
#include <libmes.h>
#include <libmes.h>
#include <stdio.h>
@ -34,7 +34,7 @@ int bla[6] = {0,0,11223344, 55667788,0,0};
int g_c[2] = {101, 111};
int
test ()
main ()
{
f.bar = bla;
struct foo *pf = &f;

View File

@ -18,7 +18,7 @@
* along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
*/
#include "30-test.i"
#include <libmes.h>
#include <stdio.h>
#include <string.h>
@ -37,7 +37,7 @@ char *buffer = "aaaaaaaaaaaa";
char *bufzor = "bbbbbbbbbbbb";
int
test ()
main ()
{
char *p;

View File

@ -18,7 +18,7 @@
* along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
*/
#include "30-test.i"
#include <libmes.h>
struct foo {
int a;
@ -37,7 +37,7 @@ typedef struct bar bar_struct;
typedef struct bar foo_struct;
int
test ()
main ()
{
if (g_foo[0].a != 0) return 1;
if (g_foo[0].b != 1) return 2;

View File

@ -18,7 +18,7 @@
* along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
*/
#include "30-test.i"
#include <libmes.h>
#include <libmes.h>
#include <stdlib.h>
@ -71,7 +71,7 @@ struct state {
struct state g_s;
int
test ()
main ()
{
struct state *s = &g_s;

View File

@ -18,10 +18,10 @@
* along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
*/
#include "30-test.i"
#include <libmes.h>
int
test ()
main ()
{
char *s = "int";
char c = s[0];

View File

@ -18,7 +18,7 @@
* along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
*/
#include "30-test.i"
#include <libmes.h>
#include <stdio.h>
#include <stdlib.h>
@ -69,7 +69,7 @@ find2 ()
}
int
test ()
main ()
{
char *s = find0 ();
eputs (s); eputs ("\n");

View File

@ -18,7 +18,7 @@
* along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
*/
#include "30-test.i"
#include <libmes.h>
#include <libmes.h>
#include <stdio.h>
@ -34,7 +34,7 @@ struct foo {
struct foo g_foo[2];
int
test ()
main ()
{
struct foo foo;
foo.foo = g_foo;

View File

@ -18,7 +18,7 @@
* along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
*/
#include "30-test.i"
#include <libmes.h>
#include <inttypes.h>
#include <string.h>
@ -31,7 +31,7 @@ struct option {
};
int
test ()
main ()
{
struct option h = {"help", 0, 10, 1};
struct option o = {"output", 1, 11, 1};

View File

@ -18,7 +18,7 @@
* along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
*/
#include "30-test.i"
#include <libmes.h>
#include <string.h>
struct string {
@ -43,7 +43,7 @@ struct string g_t;
struct biggie tab[2];
int
test ()
main ()
{
struct string s = {"hallo"};
s.len = strlen (s.str);

View File

@ -18,7 +18,7 @@
* along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
*/
#include "30-test.i"
#include <libmes.h>
#include <stdio.h>
struct s
@ -42,7 +42,7 @@ struct anon
int
test ()
main ()
{
struct foo f = {1,2};
f.s.baz = 2; // FIXME

View File

@ -18,14 +18,14 @@
* along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
*/
#include "30-test.i"
#include <libmes.h>
#include <libmes.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int
test ()
main ()
{
char *p = "42foo\n";
int n = abtoi (&p, 0);

View File

@ -18,7 +18,7 @@
* along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
*/
#include "30-test.i"
#include <libmes.h>
struct section {
unsigned char *data;
@ -44,7 +44,7 @@ struct section section;
for (;elem < ((type *) (sec->data + sec->offset)); elem++)
int
test ()
main ()
{
struct sym* p;
p = tab3;

View File

@ -18,7 +18,7 @@
* along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
*/
#include "30-test.i"
#include <libmes.h>
#if __MESC__
#define __attribute__(x)
@ -46,7 +46,7 @@ struct foo13 tab14[3];
struct foo16 tab16[3];
int
test ()
main ()
{
unsigned char *p;

View File

@ -18,7 +18,7 @@
* along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
*/
#include "30-test.i"
#include <libmes.h>
struct file {
char *ptr;
@ -26,7 +26,7 @@ struct file {
};
int
test ()
main ()
{
struct file f;
f.ptr = f.buffer;

View File

@ -18,7 +18,7 @@
* along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
*/
#include "30-test.i"
#include <libmes.h>
#include <libmes.h>
#include <stdlib.h>
@ -39,7 +39,7 @@ struct state {
};
int
test ()
main ()
{
struct state s;
struct state *ps;

View File

@ -18,7 +18,7 @@
* along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
*/
#include "30-test.i"
#include <libmes.h>
#include <stdlib.h>
#include <stdio.h>
@ -44,7 +44,7 @@ first ()
}
int
test ()
main ()
{
if (!setjmp (buf))
first (); // when executed, setjmp returned 0

View File

@ -18,7 +18,7 @@
* along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
*/
#include "30-test.i"
#include <libmes.h>
#include <string.h>
@ -31,7 +31,7 @@ compare_int (void *a, void *b)
}
int
test ()
main ()
{
int lst[6] = {0, 5, 4, 3, 2, -1};
qsort (lst, 6, sizeof (int), compare_int);

View File

@ -18,12 +18,12 @@
* along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
*/
#include "30-test.i"
#include <libmes.h>
#include <stdio.h>
#include <string.h>
int
test ()
main ()
{
puts ("\n");
char buf[10] = {0,0,0,0,0,0,0,0,0,0};

View File

@ -18,11 +18,11 @@
* along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
*/
#include "30-test.i"
#include <libmes.h>
#include <stdio.h>
int
test ()
main ()
{
int i;
int r = sscanf ("42", "%d", &i);