summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile43
-rw-r--r--wchar.c9
2 files changed, 18 insertions, 34 deletions
diff --git a/Makefile b/Makefile
index dc407ce..5a381f7 100644
--- a/Makefile
+++ b/Makefile
@@ -43,38 +43,17 @@ TESTOBJS=main.o \
testlibc: $(TESTOBJS) $(LIBDIR)/libc.a
$(CC) -o $@ $(TESTOBJS) $(LDFLAGS)
-assert.o: assert.c test.h
-complex.o: complex.c test.h
-ctype.o: ctype.c test.h
-errno.o: errno.c test.h
-fenv.o: fenv.c test.h
-float.o: float.c test.h _float.h
-inttypes.o: inttypes.c test.h
-iso646.o: iso646.c test.h
-limits.o: limits.c test.h
-locale.o: locale.c test.h
-math.o: math.c test.h _math.h
-setjmp.o: setjmp.c test.h
-signal.o: signal.c test.h
-stdalign.o: stdalign.c test.h _stdalign.h
-stdard.o: stdarg.c test.h
-stdatomic.o: stdatomic.c test.h
-stdbool.o: stdbool.c test.h
-stddef.o: stddef.c test.h
-stdint.o: stdint.c test.h
-stdio.o: stdio.c test.h _stdio.h
-stdlib.o: stdlib.c test.h
-stdnoreturn.o: stdnoreturn.c test.h _stdnoreturn.h
-string.o: string.c test.h
-tgmath.o: tgmath.c test.h
-threads.o: threads.c test.h
-time.o: time.c test.h
-uchar.o: uchar.c test.h
-wchar.o: wchar.c test.h _wchar.h
-wctype.o: wctype.c test.h _wctype.h
-
-test.o: test.c test.h
-main.o: main.c test.h
+$(TESTOBJS): test.h
+float.o: _float.h
+math.o: _math.h
+stdalign.o: _stdalign.h
+stdio.o: _stdio.h
+stdnoreturn.o: _stdnoreturn.h
+wchar.o: _wchar.h
+wctype.o: _wctype.h
+
+test.o: test.h
+main.o: test.h
.d.h:
awk '{printf("#ifndef %s\n#error %s not defined\n#endif\n", $$0, $$0);}' $< > $@
diff --git a/wchar.c b/wchar.c
index eb3f817..39a040b 100644
--- a/wchar.c
+++ b/wchar.c
@@ -14,8 +14,13 @@ void test_wchar_h(void)
testing_header("wchar.h");
test_true(NULL == 0);
- test_min(WCHAR_MIN, 0);
- test_min(WCHAR_MAX, 0);
+
+ if (WCHAR_MIN == 0) {
+ test_min(WCHAR_MAX, 255);
+ } else {
+ test_min(WCHAR_MIN, -127);
+ test_min(WCHAR_MAX, 127);
+ }
testing_end();
}