decvalue for RFC4826 XML fails
Submitted by Elemer Lelik
Link to original bug (#564193)
Description
Created attachment 283226 Compressed TTCN-3 project
see https://www.eclipse.org/forums/index.php/t/1104098/:
Hi Titan- XML experts,
I think there is a bug in decvalue when decoding simple RFC 4826 XML data . /*
- Test decvalue for XML type ResourceLists_Type */ function f_test_decvalue_ResourceLists() {
const charstring tsc_ResourceLists_1 := "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" &
"<resource-lists xmlns="urn:ietf:params:xml:ns:resource-lists" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance\">\n" &
" <list>
\n" &
" <entry uri="org.3gpp.mcptt.ue-config/users/urn:uuid:e740ed78-ca4f-4435-8006-a4d97925a684"/>\n" &
" </list>
\n" &
"</resource-lists>
\n";
var ResourceLists_Type v_DecodedResourceLists;
var bitstring v_BitStr;
v_BitStr := oct2bit(char2oct( tsc_ResourceLists_1));
if (decvalue(v_BitStr, v_DecodedResourceLists) != 0) {
log(v_DecodedResourceLists);
setverdict(fail);
} else {
setverdict(pass);
}
}
The good news is that only the return value is incorrect, the decoded value is correct :-)
Attached my sub-project.
Regards, Olaf
Attachment 283226, "Compressed TTCN-3 project":
DemoTitanBug.zip
Version: 6.6.1