Commit 568d8d7f authored by balaskoa's avatar balaskoa
Browse files

New test cases in regression_test/EncodeDecode/JSON/JsonBasicTest


Signed-off-by: default avatarbalaskoa <Jeno.Balasko@ericsson.com>
Change-Id: I21e5b0fb1dfe751c772b3378b7103ebbfc64d142
parent a532f4fd
...@@ -295,6 +295,7 @@ testcase tc_jsonBasic_encdec_os_verdict() runs on CT { ...@@ -295,6 +295,7 @@ testcase tc_jsonBasic_encdec_os_verdict() runs on CT {
testcase tc_jsonBasic_encdec_os_record() runs on CT { testcase tc_jsonBasic_encdec_os_record() runs on CT {
const R_json x := { const R_json x := {
i := 1, i := 1,
f:=2.0,
bs := '1'B, bs := '1'B,
cs := "1", cs := "1",
hs :='1'H, hs :='1'H,
...@@ -304,6 +305,7 @@ testcase tc_jsonBasic_encdec_os_record() runs on CT { ...@@ -304,6 +305,7 @@ testcase tc_jsonBasic_encdec_os_record() runs on CT {
}; };
var R_json y := { var R_json y := {
i := 1, i := 1,
f:=2.0,
bs := '1'B, bs := '1'B,
cs := "1", cs := "1",
hs :='1'H, hs :='1'H,
...@@ -313,7 +315,7 @@ testcase tc_jsonBasic_encdec_os_record() runs on CT { ...@@ -313,7 +315,7 @@ testcase tc_jsonBasic_encdec_os_record() runs on CT {
}, },
z; z;
var octetstring os; var octetstring os;
var octetstring expected := unichar2oct("{\"i\":1,\"bs\":\"1\",\"cs\":\"1\",\"hs\":\"1\",\"os\":\"01\",\"ucs\":\"" & char(0, 0, 0, 1) & "\",\"e\":\"first\"}"); var octetstring expected := unichar2oct("{\"i\":1,\"f\":2.000000,\"bs\":\"1\",\"cs\":\"1\",\"hs\":\"1\",\"os\":\"01\",\"ucs\":\"" & char(0, 0, 0, 1) & "\",\"e\":\"first\"}");
log("expected:",expected); log("expected:",expected);
os := f_json_enc_r2os(x); os := f_json_enc_r2os(x);
log(os); log(os);
......
...@@ -28,6 +28,7 @@ type verdicttype V_json; ...@@ -28,6 +28,7 @@ type verdicttype V_json;
type record R_json { type record R_json {
I_json i, I_json i,
F_json f,
BS_json bs, BS_json bs,
CS_json cs, CS_json cs,
HS_json hs, HS_json hs,
...@@ -36,6 +37,17 @@ type record R_json { ...@@ -36,6 +37,17 @@ type record R_json {
E_json e E_json e
} }
type record Ropt_json {
I_json i optional,
F_json f optional,
BS_json bs optional,
CS_json cs optional,
HS_json hs optional,
OS_json os optional,
UCS_json ucs optional,
E_json e optional
}
type record of integer RoI_json; type record of integer RoI_json;
type set S_json { type set S_json {
......
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