Commit b6dff628 authored by balaskoa's avatar balaskoa
Browse files

Corrections after internal review


Signed-off-by: default avatarbalaskoa <Jeno.Balasko@ericsson.com>
Change-Id: I0315b93f6d5041799787e1199e911ba253256b2b
parent 4e6c32bc
......@@ -182,16 +182,7 @@ testcase tc_rec_attr_name_as_and_omit_as_null_intvalue() runs on CT {
f_compare_bitstring(expected,encoded);
}
//Attribute: as value & omit as null
testcase tc_rec_attr_as_value_and_omit_as_null_omitvalue() runs on CT {
var R4_json x := { i:= 1 }
var bitstring expected := oct2bit(char2oct("1"));
var bitstring encoded := encvalue(x);
log(bit2oct(encoded));
f_compare_bitstring(expected,encoded);
}
testcase tc_rec_attr_as_value_and_omit_as_null_intvalue() runs on CT {
testcase tc_rec_attr_as_value_intvalue() runs on CT {
var R4_json x := { i:= 1 }
var bitstring expected := oct2bit(char2oct("1"));
var bitstring encoded := encvalue(x);
......@@ -199,6 +190,7 @@ testcase tc_rec_attr_as_value_and_omit_as_null_intvalue() runs on CT {
log(bit2oct(encoded));
f_compare_bitstring(expected,encoded);
}
control {
execute(tc_attr_enum_no_attr());
execute(tc_attr_enum_text_attr());
......@@ -210,8 +202,7 @@ control {
execute(tc_rec_attr_name_as_intvalue());
execute(tc_rec_attr_name_as_and_omit_as_null_omitvalue());
execute(tc_rec_attr_name_as_and_omit_as_null_intvalue());
execute(tc_rec_attr_as_value_and_omit_as_null_omitvalue());
execute(tc_rec_attr_as_value_and_omit_as_null_intvalue());
execute(tc_rec_attr_as_value_intvalue());
}
} with {
......
......@@ -143,7 +143,7 @@ testcase tc_jsonBasic_encdec_integer_unbound() runs on CT {
if( match(e,t_unbound2)){
setverdict(pass)
} else {
setverdict(fail, match(e,t_unbound2)); //TODO: got: Dynamic test case error: The argument of function bit2oct() is an unbound bitstring value
setverdict(fail, match(e,t_unbound2));
}
}
......@@ -527,7 +527,7 @@ testcase tc_jsonBasic_encdec_float_unbound() runs on CT {
if( match(e,t_unbound2)){
setverdict(pass)
} else {
setverdict(fail, match(e,t_unbound2)); //TODO: got: Dynamic test case error: The argument of function bit2oct() is an unbound bitstring value
setverdict(fail, match(e,t_unbound2));
}
}
......@@ -540,7 +540,7 @@ testcase tc_jsonBasic_encdec_float_unbound() runs on CT {
if( match(e,t_unbound2)){
setverdict(pass)
} else {
setverdict(fail, match(e,t_unbound2)); //got: Dynamic test case error: The argument of function bit2oct() is an unbound bitstring value
setverdict(fail, match(e,t_unbound2));
}
}
}
......@@ -891,13 +891,11 @@ testcase tc_jsonBasic_encdec_ucharstring() runs on CT {
const UCS_json x := char(0,0,0,1);
var UCS_json y := char(0,0,0,1);
var bitstring bs;
//var bitstring expected := '00100010 00000001 00100010'B; //"x01" ok, too
var bitstring expected := oct2bit(unichar2oct("\"\\u0001\"")); //ok
log("expected:",expected);
bs := f_json_enc_ucs2bs(x);
log(bs);
log(bit2oct(bs)); //'220122'O = "01"
log(oct2char(bit2oct(bs))); // "\"" & char(0, 0, 0, 1) & "\""
log(bit2oct(bs));
f_compare_bitstring(bs, expected);
bs := f_json_enc_ucs2bs(y);
......@@ -988,7 +986,8 @@ testcase tc_jsonBasic_encdec_record() runs on CT {
e := first
};
var bitstring bs;
var bitstring expected := oct2bit(unichar2oct("{\"i\":1,\"f\":2.000000,\"bs\":\"1\",\"cs\":\"1\",\"hs\":\"1\",\"os\":\"01\",\"ucs\":\"\\u0001\",\"e\":\"first\"}"));// ???
var bitstring expected :=
oct2bit(unichar2oct("{\"i\":1,\"f\":2.000000,\"bs\":\"1\",\"cs\":\"1\",\"hs\":\"1\",\"os\":\"01\",\"ucs\":\"\\u0001\",\"e\":\"first\"}"));
log("expected:",expected);
bs := f_json_enc_r2bs(x);
log(bs);
......@@ -1044,7 +1043,7 @@ testcase tc_jsonBasic_encdec_set() runs on CT {
e := first
};
var bitstring bs;
var bitstring expected := oct2bit(unichar2oct("{\"i\":1,\"bs\":\"1\",\"cs\":\"1\",\"hs\":\"1\",\"os\":\"01\",\"ucs\":\"\\u0001\",\"e\":\"first\"}"));// ???
var bitstring expected := oct2bit(unichar2oct("{\"i\":1,\"bs\":\"1\",\"cs\":\"1\",\"hs\":\"1\",\"os\":\"01\",\"ucs\":\"\\u0001\",\"e\":\"first\"}"));
log("expected:",expected);
bs := f_json_enc_s2bs(x);
log(bs);
......@@ -1084,7 +1083,7 @@ testcase tc_jsonBasic_encdec_AI3() runs on CT {
const AI3_json x := { 0,1,-1234 };
var AI3_json y := { 0,1,-1234 };
var bitstring bs;
var bitstring expected := oct2bit(unichar2oct("[0,1,-1234]"));// ???
var bitstring expected := oct2bit(unichar2oct("[0,1,-1234]"));
log("expected:",expected);
bs := f_json_enc_ai3tobs(x);
log(bs);
......@@ -1156,7 +1155,7 @@ testcase tc_jsonBasic_encdec_roi2() runs on CT {
const RoI_json x := { 0,1,9,10,123456789, -1, -1234567890123 };
var RoI_json y := { 0,1,9,10,123456789, -1, -1234567890123 };
var bitstring bs;
var bitstring expected := oct2bit(unichar2oct("[0,1,9,10,123456789,-1,-1234567890123]"));// ???
var bitstring expected := oct2bit(unichar2oct("[0,1,9,10,123456789,-1,-1234567890123]"));
log("expected:",expected);
bs := f_json_enc_roi2bs(x);
log(bs);
......@@ -1419,13 +1418,13 @@ control {
execute( tc_jsonBasic_encdec_hexstring() );
execute( tc_jsonBasic_encdec_octetstring() );
execute( tc_jsonBasic_encdec_ucharstring() );
// execute( tc_jsonBasic_encdec_verdict());
execute( tc_jsonBasic_encdec_verdict());
//JSON objects:
execute( tc_jsonBasic_encdec_record() );
execute( tc_jsonBasic_encdec_set() );
execute( tc_jsonBasic_encdec_roi1() );
execute( tc_jsonBasic_encdec_roi2() );
// execute( tc_jsonBasic_encdec_AI3());
execute( tc_jsonBasic_encdec_AI3());
execute( tc_jsonBasic_encdec_soi1() );
execute( tc_jsonBasic_encdec_soi2() );
execute( tc_jsonBasic_encdec_soi3() );
......
......@@ -147,8 +147,6 @@ template charstring t_using_omit := pattern "*Dynamic test case error: Using the
testcase tc_jsonBasic_encdec_os_integer_field_optional_omit() runs on CT {
var Ropt_json y := { i:= omit, f:= 2.0, bs := '1'B, cs :="1",hs:='1'H,os :='01'O,ucs:="1", e:= first }
var octetstring os;
var octetstring expected := char2oct("2");
log("expected:",expected);
@try {
os := f_json_enc_i2os(y.i);
......@@ -340,7 +338,7 @@ testcase tc_jsonBasic_encdec_os_float_unbound() runs on CT {
if( match(e,t_unbound2)){
setverdict(pass)
} else {
setverdict(fail, match(e,t_unbound2)); //TODO: got: Dynamic test case error: The argument of function bit2oct() is an unbound bitstring value
setverdict(fail, match(e,t_unbound2));
}
}
}
......@@ -966,8 +964,8 @@ control {
execute( tc_jsonBasic_encdec_os_hexstring_unbound() );
execute( tc_jsonBasic_encdec_os_octetstring() );
execute( tc_jsonBasic_encdec_os_ucharstring() );
// execute( tc_jsonBasic_encdec_os_AI3() );
// execute( tc_jsonBasic_encdec_os_verdict() );
execute( tc_jsonBasic_encdec_os_AI3() );
execute( tc_jsonBasic_encdec_os_verdict() );
execute( tc_jsonBasic_encdec_os_record() );
execute( tc_jsonBasic_encdec_os_roi1() );
execute( tc_jsonBasic_encdec_os_roi2() );
......
......@@ -10,7 +10,6 @@
#
###############################################################################
[MODULE_PARAMETERS]
# This section shall contain the values of all parameters that are defined in your TTCN-3 modules.
[LOGGING]
# In this section you can specify the name of the log file and the classes of events
......@@ -26,25 +25,6 @@ LogEventTypes := Yes
SourceInfoFormat := Single
LogEntityName := Yes
[TESTPORT_PARAMETERS]
# In this section you can specify parameters that are passed to Test Ports.
[DEFINE]
# In this section you can create macro definitions,
# that can be used in other configuration file sections except [INCLUDE].
[INCLUDE]
# To use configuration settings given in other configuration files,
# the configuration files just need to be listed in this section, with their full or relative pathnames.
[EXTERNAL_COMMANDS]
# This section can define external commands (shell scripts) to be executed by the ETS
# whenever a control part or test case is started or terminated.
#BeginTestCase := ""
#EndTestCase := ""
#BeginControlPart := ""
#EndControlPart := ""
[EXECUTE]
JsonBasicASN1EncDecTest1
......@@ -52,13 +32,6 @@ JsonBasicAttributeTest
JsonBasicEncDecTest_bs
JsonBasicEncDecTest_os
[GROUPS]
# In this section you can specify groups of hosts. These groups can be used inside the
# [COMPONENTS] section to restrict the creation of certain PTCs to a given set of hosts.
[COMPONENTS]
# This section consists of rules restricting the location of created PTCs.
[MAIN_CONTROLLER]
# The options herein control the behavior of MC.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment