diff --git a/regression_test/json/AttributeTestcases.ttcn b/regression_test/json/AttributeTestcases.ttcn index b82b0c1ada8bb8af24f5b129b55053338c0dd8ec..88226bc787445420ec06ad280a6ae50510c4120b 100644 --- a/regression_test/json/AttributeTestcases.ttcn +++ b/regression_test/json/AttributeTestcases.ttcn @@ -352,6 +352,8 @@ testcase tc_attribute_metainfo_for_unbound_arrays() runs on MTC { f_bool2verdict( log2str(f_dec_meta_arr(os)) == log2str(arr) ); } +// Encoding a record with one field without field names (attribute 'as value') +// The record value's encoding in this case is equal to the field's encoding testcase tc_attribute_as_value_rec() runs on MTC { var RecAsValue val := { field := 10 }; var bitstring enc_exp := oct2bit(char2oct("10")); @@ -377,6 +379,9 @@ testcase tc_attribute_as_value_rec() runs on MTC { } } +// Encoding a record with one field without any variant attributes +// (The code generated in this case is different, because of the possibility of +// adding the 'as value' attribute for a subtype) testcase tc_attribute_not_as_value_rec() runs on MTC { var RecNotAsValue val := { field := { 1.0, 2.0 } }; var bitstring enc_exp := oct2bit(char2oct("{\"field\":[1.000000,2.000000]}")); @@ -402,6 +407,10 @@ testcase tc_attribute_not_as_value_rec() runs on MTC { } } +// Encoding a set, whose fields are encoded without field names (attribute 'as value' for the fields) +// The base types of the fields do not have the 'as value' attribute set, only when they are used as +// fields of this set (one of the fields is an anytype, which cannot have this attribute otherwise). +// The set itself is encoded with field names, but its fields are encoded as values. testcase tc_attribute_as_value_fields() runs on MTC { var SetWithAsValueFields val := { uni := { i := -3 }, diff --git a/usrguide/referenceguide.doc b/usrguide/referenceguide.doc index 9ada0d4c31829ad79b26f6616abd3dbeaa0654c0..f6734af014833b743595819661f46442b2db8b23 100644 Binary files a/usrguide/referenceguide.doc and b/usrguide/referenceguide.doc differ