00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 static const char *rcsid = "$Header: /export/cvs-gridlab/wp-1/Codes/GATEngine/C-reference/test/simple/advertservice_delete_tests.c,v 1.6 2004/04/20 17:04:59 hartmutkaiser Exp $";
00019
00020
00021
00022 #include <stdio.h>
00023 #include <stdlib.h>
00024 #include <string.h>
00025
00026
00027
00028 #include "GAT.h"
00029 #include "GATTestUtils.h"
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041 int main(int argc, const char * const argv[])
00042 {
00043 GATContext context = NULL;
00044 GATAdvertService advertservice = NULL;
00045 GATResult retval = GAT_SUCCESS;
00046 char const *pathstr = "/AdvertServiceTests/./Files/MyCheckpointFile";
00047 GATString path = NULL;
00048
00049 GAT_TEST_INIT (-1);
00050 GAT_TEST_SUITE ("AdvertService")
00051
00052 context = GATContext_Create();
00053 GAT_TEST(NULL != context);
00054
00055
00056
00057 GAT_TEST_TRACE(GATType_GATContext == GATContext_GetType(context), context);
00058
00059 GAT_TEST_START ("AdvertService Delete Test");
00060
00061 advertservice = GATAdvertService_Create(context, 0);
00062 GAT_TEST_TRACE(NULL != advertservice, context);
00063
00064
00065 path = GATString_Create(pathstr, (GATuint32)strlen(pathstr)+1, "ASCII");
00066 GAT_TEST_TRACE(NULL != path, context);
00067
00068
00069 retval = GATAdvertService_Delete(advertservice, path);
00070 GAT_TEST_TRACE(GAT_SUCCEEDED(retval), context);
00071
00072
00073 GATString_Destroy(&path);
00074 GATAdvertService_Destroy(&advertservice);
00075 GATContext_Destroy(&context);
00076
00077 GAT_TEST_STOP ();
00078 GAT_TEST_FINISH();
00079
00080 return 0;
00081 }
00082