From: Aleš Křenek Date: Tue, 26 Aug 2008 12:56:28 +0000 (+0000) Subject: Fill in enum fields with reasonable values. X-Git-Tag: myproxy-config-R_2_0_2_1~64 X-Git-Url: http://scientific.zcu.cz/git/?a=commitdiff_plain;h=44b3ab1d37bf182c14c159c4c1160f8cacf12724;p=jra1mw.git Fill in enum fields with reasonable values. --- diff --git a/org.glite.lb.common/test/parse.cpp.T b/org.glite.lb.common/test/parse.cpp.T index 743134c..3a9620c 100644 --- a/org.glite.lb.common/test/parse.cpp.T +++ b/org.glite.lb.common/test/parse.cpp.T @@ -67,9 +67,15 @@ void EventParseTest::$l() for ($event->getFieldsOrdered) { my $f = selectField $event $_; my $fn = getName $f; + my $value = ''; - if (!$f->{codes}) { - my $value = ''; + if ($f->{codes}) { + my $fnu = uc $fn; + + my $v = "EDG_WLL_${u}_$f->{codes}->[0]->{name}"; + $value = "e1->$l.$fn = $v;"; + } + else { # $value = "e1->$l.$fn = value;"; # $value = $f->fromString('value',"e1->$l.$fn"); if (($f->{type} eq "int") || ($f->{type} eq "port")) { @@ -87,8 +93,8 @@ void EventParseTest::$l() } else { gen "% FIXME: unknown type $f->{type} for $fn \n"; } - gen "\t$value\n"; } + gen "\t$value\n"; } gen ' line = edg_wll_UnparseEvent(ctx,e1);