Check in tests

* tests/Imakefile:
* tests/README
* tests/basic_test_card.png:
* tests/blue.png:
* tests/simple_test.c:
* tests/simple_test.dump:
* tests/svnignore.txt:
* tests/test_harness.c:
* tests/test_harness.h: New files.
This commit is contained in:
hujianwei 2022-11-04 02:41:19 +00:00
parent 2230f5e406
commit 83a2d26df3
9 changed files with 1063 additions and 0 deletions

37
tests/Imakefile Normal file
View file

@ -0,0 +1,37 @@
#include "../12to11.conf"
12TO11ROOT = ..
DEPLIBS = $(DEPXLIB)
LOCAL_LIBRARIES = $(WAYLAND_CLIENT) $(XLIB) $(PNG)
COMMONOBJS = test_harness.o
COMMONSRCS = test_harness.c
HEADER = test_harness.h
EXTRA_DEFINES := -D_GNU_SOURCE -U_BSD_SOURCE -U_SVID_SOURCE
#define ScannerTarget(name) @@\
name.h: $(12TO11ROOT)/name.xml @@\
$(WAYLAND_SCANNER) client-header $< $@ @@\
@@\
name.c: $(12TO11ROOT)/name.xml name.h @@\
$(WAYLAND_SCANNER) private-code $< $@ @@\
@@\
COMMONOBJS := $(COMMONOBJS) name.o @@\
COMMONSRCS := $(COMMONSRCS) name.c @@\
HEADER := $(HEADER) name.h @@\
ScannerTarget(12to11-test)
SRCS1 = $(COMMONSRCS) simple_test.c
OBJS1 = $(COMMONOBJS) simple_test.o
PROGRAMS = simple_test
/* Make all objects depend on HEADER. */
$(OBJS1): $(HEADER)
/* And depend on all sources and headers. */
depend:: $(HEADER) $(SRCS1)
NormalProgramTarget(simple_test,$(OBJS1),NullParameter,$(LOCAL_LIBRARIES),NullParameter)
DependTarget3($(SRCS1),NullParameter,NullParameter)
all:: $(PROGRAMS)