check.parse: test_parse
./test_parse ${REPORTS}/parse.xml
-test_parse: parse.o
+test_parse: parse.o test_main.cpp
${LINKXX} -o test_parse parse.o ${LTLIB} ${TEST_LIBS} ${EXT_LIBS}
check.il: il_test
const edg_wll_Event *e2 /* event 2 IN */
)
{
+ char *tmp1, *tmp2;
+ int tmp3;
if (e1->any.type != e2->any.type) return edg_wll_SetError(context,EDG_WLL_ERROR_COMPARE_EVENTS,"Different event types");
@@@{
selectType $event '_common_';
int flags,
char **message)
{
- char *pomA=NULL, *pomB=NULL, *pomC=NULL, *cflags=NULL;
+ char *pomA=NULL, *pomB=NULL, *pomC=NULL, *cflags=NULL, *nid=NULL, *nop=NULL;
pomA = strdup("");
- edg_wll_add_string_to_XMLBody(&pomA, edg_wll_NotifIdUnparse(notifId), "notifId", NULL);
+ nid = edg_wll_NotifIdUnparse(notifId);
+ nop = edg_wll_NotifChangeOpToString(op);
+ edg_wll_add_string_to_XMLBody(&pomA, nid, "notifId", NULL);
edg_wll_add_string_to_XMLBody(&pomA, address, "clientAddress", NULL);
- edg_wll_add_string_to_XMLBody(&pomA, edg_wll_NotifChangeOpToString(op), "notifChangeOp", NULL);
+ edg_wll_add_string_to_XMLBody(&pomA, nop, "notifChangeOp", NULL);
edg_wll_add_time_t_to_XMLBody(&pomA, validity, "requestedValidity", -1);
if (conditions && conditions[0] && conditions[0][0].attr != EDG_WLL_QUERY_ATTR_UNDEF)
edg_wll_JobQueryRecToXML(ctx, conditions, &pomB);
free(cflags);
+ free(nid);
+ free(nop);
free(pomA);
free(pomB);
*message = pomC;
void testPutInt() {
put_int(buffer, 17);
- CPPUNIT_ASSERT(!strcmp(buffer, "17\n"));
+ CPPUNIT_ASSERT(!strncmp(buffer, "17\n", 3));
}
void testGetInt() {
e1->any.level = 7;
e1->any.priority = 0;
edg_wlc_JobIdParse("https://some.host:1234/x67qr549qc",&e1->any.jobId);
- e1->any.seqcode = EDG_WLL_SEQ_BIGHELPER_INITIAL;
+ e1->any.seqcode = strdup(EDG_WLL_SEQ_BIGHELPER_INITIAL);
e1->any.user = strdup("/O=Grid/CN=This User");
e1->any.source = EDG_WLL_SOURCE_USER_INTERFACE;
e1->any.src_instance = strdup("");
edg_wll_Error(ctx,&et,&ed);
CPPUNIT_ASSERT_MESSAGE(std::string("edg_wll_CompareEvents():") + et + " " + ed, 0);
}
+
+ edg_wll_FreeEvent(e1); free(e1);
+ edg_wll_FreeEvent(e2); free(e2);
+ edg_wll_FreeContext(ctx);
+ free(line);
}
';
#include <cppunit/TestResult.h>
#include <cppunit/TestResultCollector.h>
+#include <glite/lb/connpool.h>
+
int main (int argc,const char *argv[])
{
CppUnit::Test *suite = CppUnit::TestFactoryRegistry::getRegistry().makeTest();
xout.write();
tout.write();
+ edg_wll_poolFree();
+
return result.wasSuccessful() ? 0 : 1 ;
}
string=>'if ($b eq \'NULL\') { qq{(($a) == NULL)}; }
else { qq{(($a) == NULL && ($b) == NULL) || (($a)&&($b)&& !strcmp($a,$b))}; } ',
jobid=>'if ($b eq \'NULL\') { qq{(($a) == NULL) }; }
- else { qq{(($a) == NULL && ($b) == NULL) || (($a)&&($b)&& !strcmp(edg_wlc_JobIdUnparse($a),edg_wlc_JobIdUnparse($b)))}; }',
+ else { qq{(($a) == NULL && ($b) == NULL) || (($a)&&($b)&& !(tmp1=glite_jobid_unparse($a),tmp2=glite_jobid_unparse($b),tmp3=strcmp(tmp1,tmp2),free(tmp1),free(tmp2),tmp3))}; }',
notifid=>'if ($b eq \'NULL\') { qq{(($a) == NULL) }; }
- else { qq{(($a) == NULL && ($b) == NULL) || (($a)&&($b)&& !strcmp(edg_wll_NotifIdUnparse($a),edg_wll_NotifIdUnparse($b)))}; }',
+ else { qq{(($a) == NULL && ($b) == NULL) || (($a)&&($b)&& !(tmp1=edg_wll_NotifIdUnparse($a),tmp2=edg_wll_NotifIdUnparse($b),tmp3=strcmp(tmp1,tmp2),free(tmp1),free(tmp2),tmp3))}; }',
logsrc=>'"($a) == ($b)"',
timeval=>'"($a).tv_sec == ($b).tv_sec && ($a).tv_usec == ($b).tv_usec"',
cclassad=>'"($a == $b)"',