freeswitch/libs/libtpl-1.5/tests
Anthony Minessale 4985a41f27 add tpl to tree (please check win build) 2012-09-13 15:01:01 -05:00
..
other
threads
Makefile
Makefile.alt
Makefile.mingw
README
dbx.sh
do_tests
do_tests.cygwin
int64_align.c
malign.c
mgwtest.c
sizes
test1
test1-mingw.c
test1.ans
test1.c
test1.out
test2
test2.ans
test2.c
test2.out
test3
test3.ans
test3.c
test3.out
test4
test4.ans
test4.c
test4.out
test5
test5.ans
test5.c
test5.out
test6
test6.ans
test6.c
test6.out
test7
test7.ans
test7.c
test7.out
test8
test8.ans
test8.c
test8.out
test9
test9.ans
test9.c
test9.out
test9.tpl
test10
test10.ans
test10.c
test10.out
test10.tpl
test11
test11.ans
test11.c
test11.out
test11.tpl
test12
test12.ans
test12.c
test12.out
test12.tpl
test13
test13.ans
test13.c
test13.out
test13.tpl
test14
test14.ans
test14.c
test14.out
test14.tpl
test15
test15.ans
test15.c
test15.out
test15.tpl
test16
test16.ans
test16.c
test16.out
test16.tpl
test17
test17.ans
test17.c
test17.out
test17.tpl
test18
test18.ans
test18.c
test18.out
test19
test19.ans
test19.c
test19.out
test20
test20.ans
test20.c
test20.out
test21
test21.ans
test21.c
test21.out
test22
test22.ans
test22.c
test22.out
test23
test23.ans
test23.c
test23.out
test24
test24.ans
test24.c
test24.out
test24.tpl
test25
test25.ans
test25.c
test25.out
test25.tpl
test26
test26.ans
test26.c
test26.out
test26_0.tpl
test26_1.tpl
test26_2.tpl
test26_3.tpl
test27
test27.ans
test27.c
test27.out
test28
test28.ans
test28.c
test28.out
test29
test29.ans
test29.c
test29.out
test30
test30.ans
test30.c
test30.out
test31
test31.ans
test31.c
test31.out
test32
test32.ans
test32.c
test32.out
test33
test33.ans
test33.c
test33.out
test34
test34.ans
test34.c
test34.out
test35
test35.ans
test35.c
test35.out
test36
test36.ans
test36.c
test36.out
test37
test37.ans
test37.c
test37.out
test38
test38.ans
test38.c
test38.out
test39
test39.ans
test39.c
test39.out
test39.tpl
test40
test40.ans
test40.c
test40.out
test41
test41.ans
test41.c
test41.out
test42
test42.ans
test42.c
test42.out
test43
test43.ans
test43.c
test43.out
test44
test44.ans
test44.c
test44.out
test45
test45.ans
test45.c
test45.out
test46
test46.ans
test46.c
test46.out
test47
test47.ans
test47.c
test47.out
test48
test48.ans
test48.c
test48.out
test49
test49.ans
test49.c
test49.out
test50
test50.ans
test50.c
test50.out
test51
test51.ans
test51.c
test51.out
test51_0.tpl
test51_1.tpl
test51_2.tpl
test51_3.tpl
test51_4.tpl
test52
test52.ans
test52.c
test52.out
test53
test53.ans
test53.c
test53.out
test54
test54.ans
test54.c
test54.out
test54_0.tpl
test54_1.tpl
test54_2.tpl
test54_3.tpl
test54_4.tpl
test55
test55.ans
test55.c
test55.out
test55_0.tpl
test55_1.tpl
test55_2.tpl
test55_3.tpl
test56
test56.ans
test56.c
test56.out
test57
test57.ans
test57.c
test57.out
test58
test58.ans
test58.c
test58.out
test59
test59.ans
test59.c
test59.out
test60
test60.ans
test60.c
test60.out
test61
test61.ans
test61.c
test61.out
test61_0.tpl
test61_1.tpl
test62
test62.ans
test62.c
test62.out
test62_0.tpl
test63
test63.ans
test63.c
test63.out
test64
test64.ans
test64.c
test64.out
test65
test65.ans
test65.c
test65.out
test66
test66.ans
test66.c
test66.out
test67
test67.ans
test67.c
test67.out
test68
test68.ans
test68.c
test68.out
test69
test69.ans
test69.c
test69.out
test70
test70.ans
test70.c
test70.out
test71
test71.ans
test71.c
test71.out
test72
test72.ans
test72.c
test72.out
test73
test73.ans
test73.c
test73.out
test74
test74.ans
test74.c
test74.out
test75
test75.ans
test75.c
test75.out
test76
test76.ans
test76.c
test76.out
test77
test77.ans
test77.c
test77.out
test78
test78.ans
test78.c
test78.out
test79
test79.ans
test79.c
test79.out
test80
test80.ans
test80.c
test80.out
test81
test81.ans
test81.c
test81.out
test82
test82.ans
test82.c
test82.out
test83
test83.ans
test83.c
test83.out
test84
test84.ans
test84.c
test84.out
test84_0.tpl
test84_1.tpl
test85
test85.ans
test85.c
test85.out
test85.tpl
test86
test86.ans
test86.c
test86.out
test87
test87.ans
test87.c
test87.out
test88
test88.ans
test88.c
test88.out
test89
test89.ans
test89.c
test89.out
test90
test90.ans
test90.c
test90.out
test91
test91.ans
test91.c
test91.out
test92
test92.ans
test92.c
test92.out
test93
test93.ans
test93.c
test93.out
test94
test94.ans
test94.c
test94.out
test95
test95.ans
test95.c
test95.out
test96
test96.ans
test96.c
test96.out
test97
test97.ans
test97.c
test97.out
test98
test98.ans
test98.c
test98.out
test99
test99.ans
test99.c
test99.out
test99.tpl
test100
test100.ans
test100.c
test100.out
test101
test101.ans
test101.c
test101.out
test102
test102.ans
test102.c
test102.out
test103
test103.ans
test103.c
test103.out
test104
test104.ans
test104.c
test104.out
test105
test105.ans
test105.c
test105.out
test106
test106.ans
test106.c
test106.out
test107
test107.ans
test107.c
test107.out
test108
test108.ans
test108.c
test108.out
test109
test109.ans
test109.c
test109.out
test110
test110.ans
test110.c
test110.out
test111
test111.ans
test111.c
test111.out
test112
test112.ans
test112.c
test112.out
test113
test113.ans
test113.c
test113.out
test114
test114.ans
test114.c
test114.out
test115
test115.ans
test115.c
test115.out
test116
test116.ans
test116.c
test116.out
test117
test117.ans
test117.c
test117.out
test118
test118.ans
test118.c
test118.out
test119
test119.ans
test119.c
test119.out
test120
test120.ans
test120.c
test120.err
test120.out
test121
test121.ans
test121.c
test121.out
test122
test122.ans
test122.c
test122.out
test123
test123.ans
test123.c
test123.err
test123.out
test124
test124.ans
test124.c
test124.out

README

Run "make" in this directory to build the tests and run them.

test1: serialize int into memory, unserialize 
test2: serialize int into file, unserialize 
test3: serialize A(i) into file, unserialize 
test4: serialize A(i) into memory, unserialize 
test5: serialize A(A(i)) into memory, unserialize 
test6: serialize string into memory, unserialize 
test7: serialize A(s) into file, unserialize 
test8: serialize cA(c) into file, unserialize 
test9: unpack big-endian tpl data file of A(i) 
test10: unpack little-endian tpl data file of A(i) 
test11: try to load a corrupt tpl image w/invalid chars
test12: try to load a corrupt tpl image w/runaway format string
test13: try to load a corrupt tpl image w/internal A length -1
test14: try to load a corrupt tpl image w/internal A length +1
test15: try to load a corrupt tpl image w/invalid magic
test16: try to load a corrupt tpl image w/invalid len 
test17: try to load a good tpl but whose format mismatches map
test18: try to map a tpl with malformed format- unbalanced parens: missing )
test19: try to map a tpl with malformed format- unbalanced parens: extra )
test20: try to map a tpl with malformed format- empty A() 
test21: serialize A(ii) into file, unserialize
test22: serialize A(u) into file, unserialize
test23: serialize A(u) into file, read tpl from fd using TPL_FD 
test24: read A(u) tpl file with extra trailing bytes, ok in TPL_FD mode 
test25: same A(u) tpl file with extra trailing bytes, not ok in TPL_FILE mode 
test26: test non-blocking tpl_gather using async read of 3 tpls across 2 pipes
test27: test tpl_dump() of A(u) to file using TPL_FD, unserialize
test28: parent writes A(u) tpl to child through pipe, both use TPL_FD mode
test29: parent writes consecutive A(u) tpl then A(c) tpl to child through pipe
test30: test pack B (binary buffer) and unpack
test31: test pack B (binary buffer) of 0-length and unpack
test32: test pack A(B) and unpack
test33: test pack f (double) and unpack
test34: test pack A(f) and unpack
test35: pack A(is) 
test36: unpack A(is) 
test37: pack A(A(i)) [example from man page]
test38: unpack A(A(i)) [example from man page]
test39: try to load a tpl with an unsupported bit flag set
test40: pack char array - userguide example
test41: unpack char arrray - userguide example
test42: test non-aligned pointers in backbone (under Solaris dbx, check -all)
test43: test non-aligned pointers in backbone (under Solaris dbx, check -all)
test44: test non-aligned pointers in backbone (under Solaris dbx, check -all)
test46: test correct-size of backbone "double" datum (Solaris dbx, check -all)
test47: store A(i) to file - userguide example
test48: read A(i) from file - userguide example
test49: write A(s) - userguide example
test50: read A(s) - userguide example
test51: test tpl_mem_gather (_0: 1 tpl; _1: 2 tpls; _2/_3/_4: 1 tpl in 3 parts) 
test52: A(A(i)): pack an int; pack parent; pack int; don't pack parent; ser_osz
test53: A(A(i)): pack an int; pack parent; pack parent; 0-length 2nd parent el.
test54: test callback negative return value for tpl_mem_gather
test55: test callback negative return value for tpl_fd_gather
test56: test static string using c# format pack/unpack in mem
test57: test pack static string using c# to file
test58: test unpack static string using c# from file
test59: test alignment using cc#cc# pack/unpack in mem
test60: test pack-then-load (implicit intervening free, using tpl_free_keep_map)
test61: test load-then-load (implicit intervening free, using tpl_free_keep_map)
test62: test load-then-pack (implicit intervening free, using tpl_free_keep_map)
test63: test pack-then-unpack (implicit dump/load) then pack-then-unpack again  
test64: pack level 0 types, change and re-pack level 0 types, test implicit free
test65: pack int[] using format character #
test66: pack two separate int[] using format character #
test67: test expected failure if format strings agree but array lengths mismatch
test68: test octothorpe support by packing,unpacking two fixed lengths arrays 
test69: test octothorpic array support A(i#i#)
test70: test S(...) structure pack and unpack
test71: test cS(...) pack/unpack when preceded by non-structure byte
test72: test wildcard structure unpack 
test73: test wildcard structure unpack 
test74: test wildcard structure unpack 
test75: test sc# (string and byte array)
test76: test S(sc#) (structure of last)
test77: test S(sc#) (structure of last) with wildcard unpack
test78: pack A(i)c 
test79: unpack A(i)c 
test80: pack and unpack A(S(ci#))
test81: pack and unpack A(S(ci#))
test82: pack cA(i#)S(cf#)A(ci#)
test83: unpack cA(i#)S(cf#)A(ci#)
test84: repeat test83 with both big and little endian input files
test85: tpl_peek at file
test86: tpl_peek at in-memory tpl
test87: test tpl_gather(TPL_GATHER_FD_BLOCKING)
test88: test packing S(ic#f)
test89: test unpacking S(ic#f) as S(*)
test90: pack and unpack I
test91: pack and unpack U
test92: pack and unpack A(cIcU)
test93: pack and unpack NULL string
test94: pack and unpack A(s) with some null
test95: pack and unpack null string, empty string, non-empty string
test96: pack and unpack A(null string, empty string, non-empty string)
test97: pack and unapck 16-bit int/uint (j,v)
test98: pack and unapck 16-bit int/uint A(j,v)
test99: data peek at c in complex format
test100: data peek at i inside S(ic)
test101: data peek at c inside S(ic) [expected failure test]
test102: data peek at c in simple format c
test103: data peek at iscsi in S(iscsiu)
test104: data peek at iscsi in S(iscsiu) with NULL string pointer
test105: tpl_jot then unpack by normal then by tpl_peek
test106: test IS(Iiuijc#)#iiii 
test107: test S(ic#)#
test108: test IS(Iiuijc#)#iiii 
test109: test S(cijc)# where next structure elt alignment based on i
test110: test ssssiiiiiiiiiiiiiiiiiiiiiiiiiiiiifffiiii
test111: test S(icfv#)#
test112: test S(ic#fv#)#
test113: test icS(ic#fv#)#ci
test114: test multi-dimension i##
test115: test S(s)#, S(si)#, S(c#si)#
test116: test cs#i
test117: test cA(s#)i
test118: test tpl_peek(TPL_FXLENS) with cA(i#)S(cf#)A(ci#)
test119: test tpl_dump(tn,TPL_GETSIZE,&sz);
test120: test TPL_PREALLOCD and TPL_EXCESS_OK flags
test121: test s##
test122: test S(ic#f$(ci))
test123: setjmp/longjmp based fatal error handler
test124: test A(S(c#)s) as per bug report from Eric Rose