Commit 4ea3a28af9a7979c95a0bf582b650f021df65138

Authored by Georg Hopp
1 parent 3bb0b758

start work on packetTest

  1 +2011-11-17 13:32:46 +0100 Georg Hopp
  2 +
  3 + * start work on packetTest (HEAD, master)
  4 +
  5 +2011-11-17 13:14:05 +0100 Georg Hopp
  6 +
  7 + * oops, added forgotten file (origin/master, origin/HEAD)
  8 +
1 2011-11-17 13:00:11 +0100 Georg Hopp 9 2011-11-17 13:00:11 +0100 Georg Hopp
2 10
3 - * optimized the class definition stuff, add instanceOf and isObject methods and add assertion macros to use these checks (HEAD, master) 11 + * optimized the class definition stuff, add instanceOf and isObject methods and add assertion macros to use these checks
4 12
5 2011-11-17 08:33:56 +0100 Georg Hopp 13 2011-11-17 08:33:56 +0100 Georg Hopp
6 14
@@ -20,7 +28,7 @@ @@ -20,7 +28,7 @@
20 28
21 2011-11-16 19:32:44 +0100 Georg Hopp 29 2011-11-16 19:32:44 +0100 Georg Hopp
22 30
23 - * i had to remove the cool plugin stuff for my tests, as i found no working way to use this with autotools. Now all works. (origin/master, origin/HEAD) 31 + * i had to remove the cool plugin stuff for my tests, as i found no working way to use this with autotools. Now all works.
24 32
25 2011-11-16 18:14:51 +0100 Georg Hopp 33 2011-11-16 18:14:51 +0100 Georg Hopp
26 34
@@ -100,8 +100,7 @@ packet_setData( @@ -100,8 +100,7 @@ packet_setData(
100 } 100 }
101 101
102 void 102 void
103 -packet_set_default_content(  
104 - struct PACKET * _this) 103 +packet_set_default_content(struct PACKET * _this)
105 { 104 {
106 _this->content[PACKET_HEADER] = NULL; 105 _this->content[PACKET_HEADER] = NULL;
107 _this->content[PACKET_DATA] = NULL; 106 _this->content[PACKET_DATA] = NULL;
1 ACLOCAL_AMFLAGS = -I m4 1 ACLOCAL_AMFLAGS = -I m4
2 2
3 TESTS_ENVIRONMENT = valgrind --error-exitcode=123 --leak-check=full --quiet 3 TESTS_ENVIRONMENT = valgrind --error-exitcode=123 --leak-check=full --quiet
4 -TESTS = cclassTest cryptTest  
5 -check_PROGRAMS = cclassTest cryptTest 4 +TESTS = cclassTest cryptTest packetTest
  5 +check_PROGRAMS = cclassTest cryptTest packetTest
  6 +
  7 +cclassTest_SOURCES = runtest.c cclassTest.c mock/class.c ../src/cclass.c
  8 +cclassTest_LDADD = $(LIBOBJS)
  9 +cclassTest_CFLAGS = -I ../include -I .. -I .
6 10
7 cryptTest_SOURCES = runtest.c cryptTest.c ../src/cclass.c ../src/crypt.c 11 cryptTest_SOURCES = runtest.c cryptTest.c ../src/cclass.c ../src/crypt.c
8 cryptTest_LDADD = $(LIBOBJS) 12 cryptTest_LDADD = $(LIBOBJS)
9 cryptTest_CFLAGS = -I ../include -I .. -I . 13 cryptTest_CFLAGS = -I ../include -I .. -I .
10 14
11 -cclassTest_SOURCES = runtest.c cclassTest.c mock/class.c ../src/cclass.c  
12 -cclassTest_LDADD = $(LIBOBJS)  
13 -cclassTest_CFLAGS = -I ../include -I .. -I . 15 +packetTest_SOURCES = runtest.c packetTest.c ../src/cclass.c ../src/packet.c ../src/dyntype.c ../src/dyntype/hash.c
  16 +packetTest_LDADD = $(LIBOBJS)
  17 +packetTest_CFLAGS = -I ../include -I .. -I .
@@ -33,8 +33,9 @@ PRE_UNINSTALL = : @@ -33,8 +33,9 @@ PRE_UNINSTALL = :
33 POST_UNINSTALL = : 33 POST_UNINSTALL = :
34 build_triplet = @build@ 34 build_triplet = @build@
35 host_triplet = @host@ 35 host_triplet = @host@
36 -TESTS = cclassTest$(EXEEXT) cryptTest$(EXEEXT)  
37 -check_PROGRAMS = cclassTest$(EXEEXT) cryptTest$(EXEEXT) 36 +TESTS = cclassTest$(EXEEXT) cryptTest$(EXEEXT) packetTest$(EXEEXT)
  37 +check_PROGRAMS = cclassTest$(EXEEXT) cryptTest$(EXEEXT) \
  38 + packetTest$(EXEEXT)
38 subdir = tests 39 subdir = tests
39 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in 40 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
40 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 41 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
@@ -61,6 +62,15 @@ cryptTest_DEPENDENCIES = $(LIBOBJS) @@ -61,6 +62,15 @@ cryptTest_DEPENDENCIES = $(LIBOBJS)
61 cryptTest_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ 62 cryptTest_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
62 $(LIBTOOLFLAGS) --mode=link $(CCLD) $(cryptTest_CFLAGS) \ 63 $(LIBTOOLFLAGS) --mode=link $(CCLD) $(cryptTest_CFLAGS) \
63 $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ 64 $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
  65 +am_packetTest_OBJECTS = packetTest-runtest.$(OBJEXT) \
  66 + packetTest-packetTest.$(OBJEXT) packetTest-cclass.$(OBJEXT) \
  67 + packetTest-packet.$(OBJEXT) packetTest-dyntype.$(OBJEXT) \
  68 + packetTest-hash.$(OBJEXT)
  69 +packetTest_OBJECTS = $(am_packetTest_OBJECTS)
  70 +packetTest_DEPENDENCIES = $(LIBOBJS)
  71 +packetTest_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
  72 + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(packetTest_CFLAGS) \
  73 + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
64 DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) 74 DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
65 depcomp = $(SHELL) $(top_srcdir)/depcomp 75 depcomp = $(SHELL) $(top_srcdir)/depcomp
66 am__depfiles_maybe = depfiles 76 am__depfiles_maybe = depfiles
@@ -74,8 +84,10 @@ CCLD = $(CC) @@ -74,8 +84,10 @@ CCLD = $(CC)
74 LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ 84 LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
75 --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ 85 --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
76 $(LDFLAGS) -o $@ 86 $(LDFLAGS) -o $@
77 -SOURCES = $(cclassTest_SOURCES) $(cryptTest_SOURCES)  
78 -DIST_SOURCES = $(cclassTest_SOURCES) $(cryptTest_SOURCES) 87 +SOURCES = $(cclassTest_SOURCES) $(cryptTest_SOURCES) \
  88 + $(packetTest_SOURCES)
  89 +DIST_SOURCES = $(cclassTest_SOURCES) $(cryptTest_SOURCES) \
  90 + $(packetTest_SOURCES)
79 ETAGS = etags 91 ETAGS = etags
80 CTAGS = ctags 92 CTAGS = ctags
81 am__tty_colors = \ 93 am__tty_colors = \
@@ -196,12 +208,15 @@ top_builddir = @top_builddir@ @@ -196,12 +208,15 @@ top_builddir = @top_builddir@
196 top_srcdir = @top_srcdir@ 208 top_srcdir = @top_srcdir@
197 ACLOCAL_AMFLAGS = -I m4 209 ACLOCAL_AMFLAGS = -I m4
198 TESTS_ENVIRONMENT = valgrind --error-exitcode=123 --leak-check=full --quiet 210 TESTS_ENVIRONMENT = valgrind --error-exitcode=123 --leak-check=full --quiet
199 -cryptTest_SOURCES = runtest.c cryptTest.c ../src/cclass.c ../src/crypt.c  
200 -cryptTest_LDADD = $(LIBOBJS)  
201 -cryptTest_CFLAGS = -I ../include -I .. -I .  
202 cclassTest_SOURCES = runtest.c cclassTest.c mock/class.c ../src/cclass.c 211 cclassTest_SOURCES = runtest.c cclassTest.c mock/class.c ../src/cclass.c
203 cclassTest_LDADD = $(LIBOBJS) 212 cclassTest_LDADD = $(LIBOBJS)
204 cclassTest_CFLAGS = -I ../include -I .. -I . 213 cclassTest_CFLAGS = -I ../include -I .. -I .
  214 +cryptTest_SOURCES = runtest.c cryptTest.c ../src/cclass.c ../src/crypt.c
  215 +cryptTest_LDADD = $(LIBOBJS)
  216 +cryptTest_CFLAGS = -I ../include -I .. -I .
  217 +packetTest_SOURCES = runtest.c packetTest.c ../src/cclass.c ../src/packet.c ../src/dyntype.c ../src/dyntype/hash.c
  218 +packetTest_LDADD = $(LIBOBJS)
  219 +packetTest_CFLAGS = -I ../include -I .. -I .
205 all: all-am 220 all: all-am
206 221
207 .SUFFIXES: 222 .SUFFIXES:
@@ -251,6 +266,9 @@ cclassTest$(EXEEXT): $(cclassTest_OBJECTS) $(cclassTest_DEPENDENCIES) @@ -251,6 +266,9 @@ cclassTest$(EXEEXT): $(cclassTest_OBJECTS) $(cclassTest_DEPENDENCIES)
251 cryptTest$(EXEEXT): $(cryptTest_OBJECTS) $(cryptTest_DEPENDENCIES) 266 cryptTest$(EXEEXT): $(cryptTest_OBJECTS) $(cryptTest_DEPENDENCIES)
252 @rm -f cryptTest$(EXEEXT) 267 @rm -f cryptTest$(EXEEXT)
253 $(cryptTest_LINK) $(cryptTest_OBJECTS) $(cryptTest_LDADD) $(LIBS) 268 $(cryptTest_LINK) $(cryptTest_OBJECTS) $(cryptTest_LDADD) $(LIBS)
  269 +packetTest$(EXEEXT): $(packetTest_OBJECTS) $(packetTest_DEPENDENCIES)
  270 + @rm -f packetTest$(EXEEXT)
  271 + $(packetTest_LINK) $(packetTest_OBJECTS) $(packetTest_LDADD) $(LIBS)
254 272
255 mostlyclean-compile: 273 mostlyclean-compile:
256 -rm -f *.$(OBJEXT) 274 -rm -f *.$(OBJEXT)
@@ -266,6 +284,12 @@ distclean-compile: @@ -266,6 +284,12 @@ distclean-compile:
266 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cryptTest-crypt.Po@am__quote@ 284 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cryptTest-crypt.Po@am__quote@
267 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cryptTest-cryptTest.Po@am__quote@ 285 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cryptTest-cryptTest.Po@am__quote@
268 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cryptTest-runtest.Po@am__quote@ 286 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cryptTest-runtest.Po@am__quote@
  287 +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/packetTest-cclass.Po@am__quote@
  288 +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/packetTest-dyntype.Po@am__quote@
  289 +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/packetTest-hash.Po@am__quote@
  290 +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/packetTest-packet.Po@am__quote@
  291 +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/packetTest-packetTest.Po@am__quote@
  292 +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/packetTest-runtest.Po@am__quote@
269 293
270 .c.o: 294 .c.o:
271 @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< 295 @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@@ -400,6 +424,90 @@ cryptTest-crypt.obj: ../src/crypt.c @@ -400,6 +424,90 @@ cryptTest-crypt.obj: ../src/crypt.c
400 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 424 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
401 @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cryptTest_CFLAGS) $(CFLAGS) -c -o cryptTest-crypt.obj `if test -f '../src/crypt.c'; then $(CYGPATH_W) '../src/crypt.c'; else $(CYGPATH_W) '$(srcdir)/../src/crypt.c'; fi` 425 @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cryptTest_CFLAGS) $(CFLAGS) -c -o cryptTest-crypt.obj `if test -f '../src/crypt.c'; then $(CYGPATH_W) '../src/crypt.c'; else $(CYGPATH_W) '$(srcdir)/../src/crypt.c'; fi`
402 426
  427 +packetTest-runtest.o: runtest.c
  428 +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(packetTest_CFLAGS) $(CFLAGS) -MT packetTest-runtest.o -MD -MP -MF $(DEPDIR)/packetTest-runtest.Tpo -c -o packetTest-runtest.o `test -f 'runtest.c' || echo '$(srcdir)/'`runtest.c
  429 +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/packetTest-runtest.Tpo $(DEPDIR)/packetTest-runtest.Po
  430 +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='runtest.c' object='packetTest-runtest.o' libtool=no @AMDEPBACKSLASH@
  431 +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
  432 +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(packetTest_CFLAGS) $(CFLAGS) -c -o packetTest-runtest.o `test -f 'runtest.c' || echo '$(srcdir)/'`runtest.c
  433 +
  434 +packetTest-runtest.obj: runtest.c
  435 +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(packetTest_CFLAGS) $(CFLAGS) -MT packetTest-runtest.obj -MD -MP -MF $(DEPDIR)/packetTest-runtest.Tpo -c -o packetTest-runtest.obj `if test -f 'runtest.c'; then $(CYGPATH_W) 'runtest.c'; else $(CYGPATH_W) '$(srcdir)/runtest.c'; fi`
  436 +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/packetTest-runtest.Tpo $(DEPDIR)/packetTest-runtest.Po
  437 +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='runtest.c' object='packetTest-runtest.obj' libtool=no @AMDEPBACKSLASH@
  438 +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
  439 +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(packetTest_CFLAGS) $(CFLAGS) -c -o packetTest-runtest.obj `if test -f 'runtest.c'; then $(CYGPATH_W) 'runtest.c'; else $(CYGPATH_W) '$(srcdir)/runtest.c'; fi`
  440 +
  441 +packetTest-packetTest.o: packetTest.c
  442 +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(packetTest_CFLAGS) $(CFLAGS) -MT packetTest-packetTest.o -MD -MP -MF $(DEPDIR)/packetTest-packetTest.Tpo -c -o packetTest-packetTest.o `test -f 'packetTest.c' || echo '$(srcdir)/'`packetTest.c
  443 +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/packetTest-packetTest.Tpo $(DEPDIR)/packetTest-packetTest.Po
  444 +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='packetTest.c' object='packetTest-packetTest.o' libtool=no @AMDEPBACKSLASH@
  445 +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
  446 +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(packetTest_CFLAGS) $(CFLAGS) -c -o packetTest-packetTest.o `test -f 'packetTest.c' || echo '$(srcdir)/'`packetTest.c
  447 +
  448 +packetTest-packetTest.obj: packetTest.c
  449 +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(packetTest_CFLAGS) $(CFLAGS) -MT packetTest-packetTest.obj -MD -MP -MF $(DEPDIR)/packetTest-packetTest.Tpo -c -o packetTest-packetTest.obj `if test -f 'packetTest.c'; then $(CYGPATH_W) 'packetTest.c'; else $(CYGPATH_W) '$(srcdir)/packetTest.c'; fi`
  450 +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/packetTest-packetTest.Tpo $(DEPDIR)/packetTest-packetTest.Po
  451 +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='packetTest.c' object='packetTest-packetTest.obj' libtool=no @AMDEPBACKSLASH@
  452 +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
  453 +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(packetTest_CFLAGS) $(CFLAGS) -c -o packetTest-packetTest.obj `if test -f 'packetTest.c'; then $(CYGPATH_W) 'packetTest.c'; else $(CYGPATH_W) '$(srcdir)/packetTest.c'; fi`
  454 +
  455 +packetTest-cclass.o: ../src/cclass.c
  456 +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(packetTest_CFLAGS) $(CFLAGS) -MT packetTest-cclass.o -MD -MP -MF $(DEPDIR)/packetTest-cclass.Tpo -c -o packetTest-cclass.o `test -f '../src/cclass.c' || echo '$(srcdir)/'`../src/cclass.c
  457 +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/packetTest-cclass.Tpo $(DEPDIR)/packetTest-cclass.Po
  458 +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../src/cclass.c' object='packetTest-cclass.o' libtool=no @AMDEPBACKSLASH@
  459 +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
  460 +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(packetTest_CFLAGS) $(CFLAGS) -c -o packetTest-cclass.o `test -f '../src/cclass.c' || echo '$(srcdir)/'`../src/cclass.c
  461 +
  462 +packetTest-cclass.obj: ../src/cclass.c
  463 +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(packetTest_CFLAGS) $(CFLAGS) -MT packetTest-cclass.obj -MD -MP -MF $(DEPDIR)/packetTest-cclass.Tpo -c -o packetTest-cclass.obj `if test -f '../src/cclass.c'; then $(CYGPATH_W) '../src/cclass.c'; else $(CYGPATH_W) '$(srcdir)/../src/cclass.c'; fi`
  464 +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/packetTest-cclass.Tpo $(DEPDIR)/packetTest-cclass.Po
  465 +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../src/cclass.c' object='packetTest-cclass.obj' libtool=no @AMDEPBACKSLASH@
  466 +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
  467 +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(packetTest_CFLAGS) $(CFLAGS) -c -o packetTest-cclass.obj `if test -f '../src/cclass.c'; then $(CYGPATH_W) '../src/cclass.c'; else $(CYGPATH_W) '$(srcdir)/../src/cclass.c'; fi`
  468 +
  469 +packetTest-packet.o: ../src/packet.c
  470 +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(packetTest_CFLAGS) $(CFLAGS) -MT packetTest-packet.o -MD -MP -MF $(DEPDIR)/packetTest-packet.Tpo -c -o packetTest-packet.o `test -f '../src/packet.c' || echo '$(srcdir)/'`../src/packet.c
  471 +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/packetTest-packet.Tpo $(DEPDIR)/packetTest-packet.Po
  472 +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../src/packet.c' object='packetTest-packet.o' libtool=no @AMDEPBACKSLASH@
  473 +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
  474 +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(packetTest_CFLAGS) $(CFLAGS) -c -o packetTest-packet.o `test -f '../src/packet.c' || echo '$(srcdir)/'`../src/packet.c
  475 +
  476 +packetTest-packet.obj: ../src/packet.c
  477 +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(packetTest_CFLAGS) $(CFLAGS) -MT packetTest-packet.obj -MD -MP -MF $(DEPDIR)/packetTest-packet.Tpo -c -o packetTest-packet.obj `if test -f '../src/packet.c'; then $(CYGPATH_W) '../src/packet.c'; else $(CYGPATH_W) '$(srcdir)/../src/packet.c'; fi`
  478 +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/packetTest-packet.Tpo $(DEPDIR)/packetTest-packet.Po
  479 +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../src/packet.c' object='packetTest-packet.obj' libtool=no @AMDEPBACKSLASH@
  480 +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
  481 +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(packetTest_CFLAGS) $(CFLAGS) -c -o packetTest-packet.obj `if test -f '../src/packet.c'; then $(CYGPATH_W) '../src/packet.c'; else $(CYGPATH_W) '$(srcdir)/../src/packet.c'; fi`
  482 +
  483 +packetTest-dyntype.o: ../src/dyntype.c
  484 +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(packetTest_CFLAGS) $(CFLAGS) -MT packetTest-dyntype.o -MD -MP -MF $(DEPDIR)/packetTest-dyntype.Tpo -c -o packetTest-dyntype.o `test -f '../src/dyntype.c' || echo '$(srcdir)/'`../src/dyntype.c
  485 +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/packetTest-dyntype.Tpo $(DEPDIR)/packetTest-dyntype.Po
  486 +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../src/dyntype.c' object='packetTest-dyntype.o' libtool=no @AMDEPBACKSLASH@
  487 +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
  488 +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(packetTest_CFLAGS) $(CFLAGS) -c -o packetTest-dyntype.o `test -f '../src/dyntype.c' || echo '$(srcdir)/'`../src/dyntype.c
  489 +
  490 +packetTest-dyntype.obj: ../src/dyntype.c
  491 +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(packetTest_CFLAGS) $(CFLAGS) -MT packetTest-dyntype.obj -MD -MP -MF $(DEPDIR)/packetTest-dyntype.Tpo -c -o packetTest-dyntype.obj `if test -f '../src/dyntype.c'; then $(CYGPATH_W) '../src/dyntype.c'; else $(CYGPATH_W) '$(srcdir)/../src/dyntype.c'; fi`
  492 +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/packetTest-dyntype.Tpo $(DEPDIR)/packetTest-dyntype.Po
  493 +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../src/dyntype.c' object='packetTest-dyntype.obj' libtool=no @AMDEPBACKSLASH@
  494 +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
  495 +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(packetTest_CFLAGS) $(CFLAGS) -c -o packetTest-dyntype.obj `if test -f '../src/dyntype.c'; then $(CYGPATH_W) '../src/dyntype.c'; else $(CYGPATH_W) '$(srcdir)/../src/dyntype.c'; fi`
  496 +
  497 +packetTest-hash.o: ../src/dyntype/hash.c
  498 +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(packetTest_CFLAGS) $(CFLAGS) -MT packetTest-hash.o -MD -MP -MF $(DEPDIR)/packetTest-hash.Tpo -c -o packetTest-hash.o `test -f '../src/dyntype/hash.c' || echo '$(srcdir)/'`../src/dyntype/hash.c
  499 +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/packetTest-hash.Tpo $(DEPDIR)/packetTest-hash.Po
  500 +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../src/dyntype/hash.c' object='packetTest-hash.o' libtool=no @AMDEPBACKSLASH@
  501 +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
  502 +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(packetTest_CFLAGS) $(CFLAGS) -c -o packetTest-hash.o `test -f '../src/dyntype/hash.c' || echo '$(srcdir)/'`../src/dyntype/hash.c
  503 +
  504 +packetTest-hash.obj: ../src/dyntype/hash.c
  505 +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(packetTest_CFLAGS) $(CFLAGS) -MT packetTest-hash.obj -MD -MP -MF $(DEPDIR)/packetTest-hash.Tpo -c -o packetTest-hash.obj `if test -f '../src/dyntype/hash.c'; then $(CYGPATH_W) '../src/dyntype/hash.c'; else $(CYGPATH_W) '$(srcdir)/../src/dyntype/hash.c'; fi`
  506 +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/packetTest-hash.Tpo $(DEPDIR)/packetTest-hash.Po
  507 +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../src/dyntype/hash.c' object='packetTest-hash.obj' libtool=no @AMDEPBACKSLASH@
  508 +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
  509 +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(packetTest_CFLAGS) $(CFLAGS) -c -o packetTest-hash.obj `if test -f '../src/dyntype/hash.c'; then $(CYGPATH_W) '../src/dyntype/hash.c'; else $(CYGPATH_W) '$(srcdir)/../src/dyntype/hash.c'; fi`
  510 +
403 mostlyclean-libtool: 511 mostlyclean-libtool:
404 -rm -f *.lo 512 -rm -f *.lo
405 513
  1 +#include "runtest.h"
  2 +#include "token/cclass.h"
  3 +#include "token/packet.h"
  4 +#include "token/dyntype.h"
  5 +
  6 +
  7 +const char testname[] = "packetTest";
  8 +struct PACKET * packet = NULL;
  9 +
  10 +
  11 +static
  12 +int
  13 +__setUp()
  14 +{
  15 + packet = new(PACKET);
  16 +
  17 + ASSERT_INSTANCE_OF(PACKET, packet);
  18 + return TEST_OK;
  19 +}
  20 +int (* const setUp)() = __setUp;
  21 +
  22 +static
  23 +int
  24 +__tearDown()
  25 +{
  26 + if (NULL != packet) {
  27 + ASSERT_OBJECT(packet);
  28 + delete(&packet);
  29 + }
  30 +
  31 + return TEST_OK;
  32 +}
  33 +int (* const tearDown)() = __tearDown;
  34 +
  35 +static
  36 +int
  37 +testDefaultInit()
  38 +{
  39 + ASSERT_NULL(packet_getHeader(packet));
  40 + ASSERT_NULL(packet_getData(packet));
  41 +
  42 + return TEST_OK;
  43 +}
  44 +
  45 +const testfunc tests[] = {
  46 + testDefaultInit
  47 +};
  48 +const size_t count = FUNCS_COUNT(tests);
  49 +
  50 +// vim: set et ts=4 sw=4:
Please register or login to post a comment