From 4340db942a3f1dc39724c1f05264d38586bc062a Mon Sep 17 00:00:00 2001 From: solar Date: Mon, 19 Jul 2010 09:47:39 +0000 Subject: [PATCH] Moved test-related files to testing subdirectory (i.e., out of the way). --- Makefile | 2 +- {internals => testing}/_PDCLIB_test.h | 0 {functions/stdio => testing}/fprintf_reftest.incl | 2 +- {functions/stdio => testing}/fscan_sources.incl | 12 ++++++------ {functions/stdio => testing}/printf_reference.txt | 0 {functions/stdio => testing}/printf_testcases.incl | 0 {functions/stdio => testing}/scan_test.h | 0 {functions/stdio => testing}/scanf_testcases.incl | 0 {functions/stdio => testing}/sscan_sources.incl | 0 9 files changed, 8 insertions(+), 8 deletions(-) rename {internals => testing}/_PDCLIB_test.h (100%) rename {functions/stdio => testing}/fprintf_reftest.incl (83%) rename {functions/stdio => testing}/fscan_sources.incl (84%) rename {functions/stdio => testing}/printf_reference.txt (100%) rename {functions/stdio => testing}/printf_testcases.incl (100%) rename {functions/stdio => testing}/scan_test.h (100%) rename {functions/stdio => testing}/scanf_testcases.incl (100%) rename {functions/stdio => testing}/sscan_sources.incl (100%) diff --git a/Makefile b/Makefile index 6748be4..0acd1cc 100644 --- a/Makefile +++ b/Makefile @@ -33,7 +33,7 @@ PATCHFILES2 := $(shell ls platform/$(PLATFORM)/functions/stdlib/*.c) PATCHFILES3 := $(shell ls platform/$(PLATFORM)/functions/stdio/*.c) WARNINGS := -Wall -Wextra -pedantic -Wno-unused-parameter -Wshadow -Wpointer-arith -Wcast-align -Wwrite-strings -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -Wnested-externs -Winline -Wno-long-long -fno-builtin -CFLAGS := -g -std=c99 -I./internals $(WARNINGS) $(USERFLAGS) +CFLAGS := -g -std=c99 -I./internals -I./testing $(WARNINGS) $(USERFLAGS) .PHONY: all clean srcdist bindist test tests testdrivers regtests regtestdrivers todos fixmes find links unlink help diff --git a/internals/_PDCLIB_test.h b/testing/_PDCLIB_test.h similarity index 100% rename from internals/_PDCLIB_test.h rename to testing/_PDCLIB_test.h diff --git a/functions/stdio/fprintf_reftest.incl b/testing/fprintf_reftest.incl similarity index 83% rename from functions/stdio/fprintf_reftest.incl rename to testing/fprintf_reftest.incl index afc89b9..05c74c2 100644 --- a/functions/stdio/fprintf_reftest.incl +++ b/testing/fprintf_reftest.incl @@ -5,7 +5,7 @@ TESTCASE( ( buffer = fopen( "testfile", "r" ) ) != NULL ); readcounter = fread( readbuffer, 1, 2000, buffer ); TESTCASE( fclose( buffer ) == 0 ); - TESTCASE( ( buffer = fopen( "functions/stdio/printf_reference.txt", "r" ) ) != NULL ); + TESTCASE( ( buffer = fopen( "testing/printf_reference.txt", "r" ) ) != NULL ); TESTCASE( fread( refbuffer, 1, 2000, buffer ) == readcounter ); TESTCASE( fclose( buffer ) == 0 ); TESTCASE( memcmp( readbuffer, refbuffer, readcounter ) == 0 ); diff --git a/functions/stdio/fscan_sources.incl b/testing/fscan_sources.incl similarity index 84% rename from functions/stdio/fscan_sources.incl rename to testing/fscan_sources.incl index 704c542..a7dc18b 100644 --- a/functions/stdio/fscan_sources.incl +++ b/testing/fscan_sources.incl @@ -1,9 +1,9 @@ - FILE * general = fopen( "scanf_testdata_general", "wb+" ); + FILE * general = fopen( "testing/scanf_testdata_general", "wb+" ); TESTCASE( general != NULL ); TESTCASE( fwrite( "12345678901\0003-5+7\0009\3772 4 6 8 0\3771 \011 5%% 0", 1, 40, general ) == 40 ); rewind( general ); - FILE * decimal = fopen( "scanf_testdata_decimal", "wb+" ); + FILE * decimal = fopen( "testing/scanf_testdata_decimal", "wb+" ); TESTCASE( decimal != NULL ); TESTCASE( fwrite( "-0 +0 -128 +127 +255 -32768 +32767 +65535\n" "-2147483648 +2147483647 +4294967295\n" @@ -11,7 +11,7 @@ "+18446744073709551615\n", 1, 142, decimal ) == 142 ); rewind( decimal ); - FILE * hexadecimal = fopen( "scanf_testdata_hexadecimal", "wb+" ); + FILE * hexadecimal = fopen( "testing/scanf_testdata_hexadecimal", "wb+" ); TESTCASE( hexadecimal != NULL ); TESTCASE( fwrite( "-0x0 -0x000 -0x7f -0x80 0xff -0x7fff -0x8000\n" "0xffff -0x7fffffff -0x80000000 0xffffffff\n" @@ -19,7 +19,7 @@ "0xffffffffffffffff\n", 1, 146, hexadecimal ) == 146 ); rewind( hexadecimal ); - FILE * octal = fopen( "scanf_testdata_octal", "wb+" ); + FILE * octal = fopen( "testing/scanf_testdata_octal", "wb+" ); TESTCASE( octal != NULL ); TESTCASE( fwrite( "+0000 -0000 +0177 +0377 -0377 +077777 +0177777\n" "-0177777 +017777777777 +037777777777\n" @@ -28,13 +28,13 @@ "-01777777777777777777777\n", 1, 172, octal ) == 172 ); rewind( octal ); - FILE * alpha = fopen( "scanf_testdata_alpha", "wb+" ); + FILE * alpha = fopen( "testing/scanf_testdata_alpha", "wb+" ); TESTCASE( alpha != NULL ); TESTCASE( fwrite( "abcdefgh-ijklmnop[qrs%uvw]xyz", 1, 29, alpha ) == 29 ); rewind( alpha ); #ifndef REGTEST - FILE * special = fopen( "scanf_testdata_special", "wb+" ); + FILE * special = fopen( "testing/scanf_testdata_special", "wb+" ); TESTCASE( special != NULL ); TESTCASE( fwrite( "-0xz\n", 1, 5, special ) == 5 ); rewind( special ); diff --git a/functions/stdio/printf_reference.txt b/testing/printf_reference.txt similarity index 100% rename from functions/stdio/printf_reference.txt rename to testing/printf_reference.txt diff --git a/functions/stdio/printf_testcases.incl b/testing/printf_testcases.incl similarity index 100% rename from functions/stdio/printf_testcases.incl rename to testing/printf_testcases.incl diff --git a/functions/stdio/scan_test.h b/testing/scan_test.h similarity index 100% rename from functions/stdio/scan_test.h rename to testing/scan_test.h diff --git a/functions/stdio/scanf_testcases.incl b/testing/scanf_testcases.incl similarity index 100% rename from functions/stdio/scanf_testcases.incl rename to testing/scanf_testcases.incl diff --git a/functions/stdio/sscan_sources.incl b/testing/sscan_sources.incl similarity index 100% rename from functions/stdio/sscan_sources.incl rename to testing/sscan_sources.incl -- 2.40.0