00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifdef HAVE_CONFIG_H
00021 # include <config.h>
00022 #endif
00023
00024
00025
00026
00027
00028 #include <irplib_framelist.h>
00029
00030
00031
00035
00036
00037
00038
00042
00043
00044 int main(void)
00045 {
00046
00047 irplib_framelist * flist;
00048 irplib_framelist * nulllist;
00049 cpl_frameset * fset;
00050 cpl_frameset * nullset;
00051 int i;
00052
00053
00054 cpl_test_init(PACKAGE_BUGREPORT, CPL_MSG_WARNING);
00055
00056
00057
00058 irplib_framelist_delete(NULL);
00059 cpl_test_error(CPL_ERROR_NONE);
00060
00061 nulllist = irplib_framelist_cast(NULL);
00062 cpl_test_error(CPL_ERROR_NULL_INPUT);
00063 cpl_test_null(nulllist);
00064
00065 nullset = irplib_frameset_cast(NULL);
00066 cpl_test_error(CPL_ERROR_NULL_INPUT);
00067 cpl_test_null(nullset);
00068
00069 irplib_framelist_empty(NULL);
00070 cpl_test_error(CPL_ERROR_NONE);
00071
00072 i = irplib_framelist_get_size(NULL);
00073 cpl_test_error(CPL_ERROR_NULL_INPUT);
00074 cpl_test_leq(i, -1);
00075
00076
00077
00078 flist = irplib_framelist_new();
00079
00080 cpl_test_zero(irplib_framelist_get_size(flist));
00081
00082 irplib_framelist_empty(flist);
00083
00084 cpl_test_zero(irplib_framelist_get_size(flist));
00085
00086 fset = irplib_frameset_cast(flist);
00087
00088 irplib_framelist_delete(flist);
00089
00090 flist = irplib_framelist_cast(fset);
00091
00092 cpl_test_zero(irplib_framelist_get_size(flist));
00093
00094 cpl_frameset_delete(fset);
00095 irplib_framelist_delete(flist);
00096
00097 return cpl_test_end(0);
00098 }