| /////////////////////////////////////////////////////////////////////////////// |
| // |
| // Copyright (c) 2000-2019 Ericsson Telecom AB |
| // |
| // All rights reserved. This program and the accompanying materials |
| // are made available under the terms of the Eclipse Public License v2.0 |
| // which accompanies this distribution, and is available at |
| // https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.html |
| /////////////////////////////////////////////////////////////////////////////// |
| // |
| // File: XTDP_Test_Testcases.ttcn |
| // Rev: <RnXnn> |
| // Prodnr: CNL 11 |
| // Updated: 2009-10-16 |
| // Contact: http://ttcn.ericsson.se |
| /////////////////////////////////////////////////////////////////////////////// |
| |
| /////////////////////////////////////////////////////////// |
| // Module: XTDP_Test_Testcases |
| // |
| // Purpose: |
| // This module provides functions for testing the XTDP protocol module |
| // |
| // Module depends on: |
| // - |
| // |
| // Current Owner: |
| // Laszlo Skumat (ELSZSKU) |
| // |
| // Last Review Date: |
| // - |
| // |
| /////////////////////////////////////////////////////////////// |
| module XTDP_Test_Testcases |
| { |
| import from XTDP_EncDecFunctions all |
| import from ttcn_ericsson_se_protocolModules_xtdp_xtdp all; |
| import from ttcn_ericsson_se_protocolModules_xtdp_xtdl all; |
| ///import from ttcn_ericsson_se_xtdp_xtdp_1_0 all |
| //import from ttcn_ericsson_se_xtdp_xul_1_0 all |
| //import from www_mozilla_org_keymaster_gatekeeper_there_is_only_xul all; |
| //import from NoTargetNamespace all; |
| |
| |
| //const charstring c_window := "<xul:window height=\"386.000000\" id=\"EPTF_Main_Window\" orient=\"vertical\" title=\"TTCN constructed window\" width=\"820.000000\">\n<xul:hbox id=\"EPTF_Main_hbox_Textboxes\" orient=\"vertical\">\n</xul:hbox>\n<xul:tabbox id=\"EPTF_Main_Tabbox\" flex=\"1\">\n<xul:tabs>\n<xul:tab id=\"bubuTab\" label=\"bubu\">\n</xul:tab>\n<xul:tab id=\"tab2\" label=\"sec tab\">\n</xul:tab>\n</xul:tabs>\n<xul:tabpanels>\n<xul:tabpanel id=\"bubuTab\" orient=\"vertical\">\n<xul:hbox id=\"EPTF_Main_hbox\" orient=\"horizontal\">\n<xul:hbox id=\"EPTF_Main_hbox_labels\" orient=\"vertical\">\n<xul:label id=\"refreshClock\" value=\"Time elapsed since Test was started: 0.0\">\n</xul:label>\n<xul:label id=\"status\" value=\"This text will be replaced runtime.\">\n</xul:label>\n</xul:hbox>\n<xul:hbox id=\"EPTF_Main_hbox_buttons\" orient=\"horizontal\">\n<xul:spacer flex=\"1\">\n</xul:spacer>\n<xul:button id=\"EPTF_snapshot_button\" flex=\"0\" label=\"Snapshot\">\n</xul:button>\n<xul:spacer flex=\"0\">\n</xul:spacer>\n<xul:button id=\"EPTF_exit_ttcn_button\" flex=\"0\" label=\"Exit TTCN\">\n</xul:button>\n</xul:hbox>\n</xul:hbox>\n</xul:tabpanel>\n<xul:tabpanel id=\"tab2\" orient=\"vertical\">\n</xul:tabpanel>\n</xul:tabpanels>\n</xul:tabbox>\n<xul:tree id=\"tree1\" rows=\"4.000000\">\n<xul:treecols>\n<xul:treecol flex=\"1\" id=\"col1\" label=\"column\" widgetType=\"floatField\">\n</xul:treecol>\n<xul:treecol flex=\"1\" id=\"col2\" label=\"column\" widgetType=\"checkBox\">\n</xul:treecol>\n</xul:treecols>\n<xul:treechildren>\n<xul:treeitem>\n<xul:treerow>\n<xul:treecell id=\"cellFloat\" label=\"bubuCellFloat\">\n</xul:treecell>\n<xul:treecell label=\"\">\n</xul:treecell>\n</xul:treerow>\n<xul:treerow>\n<xul:treecell label=\"\">\n</xul:treecell>\n<xul:treecell id=\"cellBoxxx\" label=\"bubuCell\" tooltiptext=\"cell to connect data\">\n</xul:treecell>\n</xul:treerow>\n<xul:treerow>\n<xul:treecell label=\"\" tooltiptext=\"This is an unnamed cell connected to the cell two rows upper\">\n</xul:treecell>\n<xul:treecell label=\"\">\n</xul:treecell>\n</xul:treerow>\n<xul:treerow>\n<xul:treecell label=\"\" tooltiptext=\"This is an unnamed cell connected to the cell two rows upper\">\n</xul:treecell>\n<xul:treecell label=\"\">\n</xul:treecell>\n</xul:treerow>\n</xul:treeitem>\n</xul:treechildren>\n</xul:tree>\n<xul:chart id=\"chart1\" title=\"Demo Chart 01\" zoomable=\"true\" axisXType=\"linear\" axisYType=\"linear\" gridX=\"true\" gridY=\"false\" foregroundColor=\"Black\" backgroundColor=\"RGB:180:200:200\" gridColor=\"black\">\n<xul:trace id=\"trace01\" name=\"Red line\" color=\"red\"/>\n<xul:trace id=\"trace02\" name=\"Blue line\" color=\"blue\"/>\n</xul:chart>\n<xul:toolbar id=\"EPTF_Main_Toolbar\" placement=\"south\">\n>\n</xul:toolbar>\n</xul:window>\n" |
| |
| const Window c_xtdp_window := { |
| /*height :=*/ 386.000000, |
| /*id :=*/ "EPTF_Main_Window", |
| /*orientation :=*/ vertical, |
| /*title :=*/ "TTCN constructed window", |
| /*width :=*/ 820.000000, |
| /*image_list := */ {}, |
| /*embeddedwidgets :=*/ {{ |
| { |
| hbox := { |
| disabled := omit, |
| fixedposition := omit, |
| flex := omit, |
| id := "EPTF_Main_hbox_Textboxes", |
| orientation := vertical, |
| scrollable := omit, |
| embeddedwidgets := {embeddedwidget_list :={ |
| }} |
| } |
| }, |
| { |
| tabpages := { |
| disabled := omit, |
| flex := 1.000000, |
| id := "EPTF_Main_Tabbox", |
| layout := omit, |
| tabpagegroups := { tabpagegroup_list := { |
| { tabpage := { |
| id := "bubuTab", |
| label_ := "bubu", |
| maxheight := omit, |
| orientation := vertical, |
| tooltiptext := omit, |
| embeddedwidgets := {embeddedwidget_list :={ |
| { |
| hbox := { |
| disabled := omit, |
| fixedposition := omit, |
| flex := omit, |
| id := "EPTF_Main_hbox", |
| orientation := horizontal, |
| scrollable := omit, |
| embeddedwidgets := {embeddedwidget_list :={ |
| { |
| hbox := { |
| disabled := omit, |
| fixedposition := omit, |
| flex := omit, |
| id := "EPTF_Main_hbox_labels", |
| orientation := vertical, |
| scrollable := omit, |
| embeddedwidgets := {embeddedwidget_list :={ |
| { |
| label_ := { |
| disabled := omit, |
| flex := omit, |
| id := "refreshClock", |
| style := omit, |
| tooltiptext := omit, |
| value_ := "Time elapsed since Test was started: 0.0", |
| externaldata := omit |
| } |
| }, |
| { |
| label_ := { |
| disabled := omit, |
| flex := omit, |
| id := "status", |
| style := omit, |
| tooltiptext := omit, |
| value_ := "This text will be replaced runtime.", |
| externaldata := omit |
| } |
| } |
| }} |
| } |
| }, |
| { |
| hbox := { |
| disabled := omit, |
| fixedposition := omit, |
| flex := omit, |
| id := "EPTF_Main_hbox_buttons", |
| orientation := horizontal, |
| scrollable := omit, |
| embeddedwidgets := {embeddedwidget_list :={ |
| { |
| spacer := { |
| flex := 1.000000, |
| id := omit |
| } |
| }, |
| { |
| button := { |
| /*checked :=*/ omit, |
| /*disabled :=*/ omit, |
| /*disabledongui :=*/ omit, |
| /*flex :=*/ 0.010000, |
| /*id :=*/ "EPTF_snapshot_button", |
| /*imageid :=*/ omit, |
| /*label_ :=*/ "Snapshot", |
| /*tooltiptext :=*/ omit, |
| /*type_ :=*/ omit, |
| /*externaldata :=*/ omit |
| } |
| }, |
| { |
| spacer := { |
| flex := 0.000000, |
| id := omit |
| } |
| }, |
| { |
| button := { |
| /*checked :=*/ omit, |
| /*disabled :=*/ omit, |
| /*disabledongui :=*/ omit, |
| /*flex :=*/ 0.010000, |
| /*id :=*/ "EPTF_exit_ttcn_button", |
| /*imageid :=*/ omit, |
| /*label_ :=*/ "Exit", |
| /*tooltiptext := */omit, |
| /*type_ :=*/ omit, |
| /*externaldata :=*/ omit |
| } |
| } |
| }} |
| } |
| } |
| }} |
| } |
| } |
| }} |
| }}, |
| {tabpage := { |
| id := "tab2", |
| label_ := "sec tab", |
| maxheight := omit, |
| orientation := vertical, |
| tooltiptext := omit, |
| embeddedwidgets := {embeddedwidget_list :={ |
| }} |
| }} |
| }} |
| } |
| }, |
| { |
| tree := { |
| disabled := omit, |
| flex := omit, |
| hidecolumnpicker := omit, |
| id := "tree1", |
| rows := 4.000000, |
| treecols := {{{ |
| {treecol :={ |
| editable := omit, |
| flex := 1.000000, |
| id := "col1", |
| label_ := "column", |
| tooltiptext := omit, |
| widgetType := floatField |
| }}, |
| {treecol := { |
| /*align :=*/ omit, |
| /*disabledongui :=*/ omit, |
| /*editable :=*/ omit, |
| /*flex :=*/ 1.000000, |
| /*id :=*/ "col2", |
| /*label_ :=*/ "column", |
| /*tooltiptext :=*/ omit, |
| /*treecellalign :=*/ omit, |
| /*widgetType :=*/ checkBox |
| }} |
| }} |
| }, |
| treechildren := {{ |
| {{treeitem := |
| {{{ |
| {treerow := {{{ |
| {treecell := { |
| /*align :=*/ omit, |
| /*id :=*/ "cellFloat", |
| /*imageid :=*/ omit, |
| /*label_ :=*/ "bubuCellFloat", |
| /*tooltiptext :=*/ omit, |
| /*visible :=*/ omit, |
| /*externaldata :=*/ omit |
| }}, |
| {treecell := { |
| /*align :=*/ omit, |
| /*id :=*/ omit, |
| /*imageid :=*/ omit, |
| /*label_ :=*/ "", |
| /*tooltiptext :=*/ omit, |
| /*visible :=*/ omit, |
| /*externaldata :=*/ omit |
| }} |
| }}}}, |
| {treerow := {{{ |
| {treecell := { |
| /*align :=*/ omit, |
| /*id :=*/ omit, |
| /*imageid :=*/ omit, |
| /*label_ :=*/ "", |
| /*tooltiptext :=*/ omit , |
| /*visible :=*/ omit, |
| /*externaldata :=*/ omit |
| }}, |
| {treecell := { |
| /*align :=*/ omit, |
| /*id :=*/ "cellBoxxx", |
| /*imageid :=*/ omit, |
| /*label_ :=*/ "bubuCell", |
| /*tooltiptext :=*/ "cell to connect data", |
| /*visible :=*/ omit, |
| /*externaldata :=*/ omit |
| }} |
| }}}}, |
| {treerow := {{{ |
| {treecell := { |
| /*align :=*/ omit, |
| /*id :=*/ omit, |
| /*imageid :=*/ omit, |
| /*label_ :=*/ "", |
| /*tooltiptext :=*/ "This is an unnamed cell connected to the cell two rows upper", |
| /*visible :=*/ omit, |
| /*externaldata :=*/ omit |
| }}, |
| {treecell := { |
| /*align :=*/ omit, |
| /*id :=*/ omit, |
| /*imageid :=*/ omit, |
| /*label_ :=*/ "", |
| /*tooltiptext :=*/ omit, |
| /*visible :=*/ omit, |
| /*externaldata :=*/ omit |
| }} |
| }}}}, |
| {treerow := {{{ |
| {treecell := { |
| /*align :=*/ omit, |
| /*id :=*/ omit, |
| /*imageid :=*/ omit, |
| /*label_ :=*/ "", |
| /*tooltiptext :=*/ "This is an unnamed cell connected to the cell two rows upper", |
| /*visible :=*/ omit, |
| /*externaldata :=*/ omit |
| }}, |
| {treecell := { |
| /*align :=*/ omit, |
| /*id :=*/ omit, |
| /*imageid :=*/ omit, |
| /*label_ :=*/ "", |
| /*tooltiptext :=*/ omit, |
| /*visible :=*/ omit, |
| /*externaldata :=*/ omit |
| }} |
| }}}} |
| }}} |
| }} |
| }} |
| } |
| }, |
| { |
| chart := { |
| axisXType := linear, |
| axisYType := linear, |
| backgroundColor := "RGB:180:200:200", |
| disabled := omit, |
| flex := omit, |
| foregroundColor := "Black", |
| gridColor := "black", |
| gridX := true, |
| gridY := false, |
| id := "chart1", |
| title := "Demo Chart 01", |
| tooltiptext := omit, |
| zoomable := true, |
| tracegroups := {{{ |
| trace := { |
| color := "red", |
| fill := omit, |
| id := "trace01", |
| maxPoints := omit, |
| name := "Red line", |
| physicalUnitX := omit, |
| physicalUnitY := omit, |
| tooltiptext := omit, |
| externaldata := omit, |
| choice_list := {} |
| } |
| }, |
| { |
| trace := { |
| color := "blue", |
| fill := omit, |
| id := "trace02", |
| maxPoints := omit, |
| name := "Blue line", |
| physicalUnitX := omit, |
| physicalUnitY := omit, |
| tooltiptext := omit, |
| externaldata := omit, |
| choice_list := {} |
| } |
| } |
| }} |
| } |
| }, |
| { |
| toolbar := { |
| /*disabled :=*/ omit, |
| /*disabledongui :=*/ omit, |
| /*id :=*/ "EPTF_Main_Toolbar", |
| /*placement :=*/ south, |
| /*choice_list :=*/ { |
| |
| } |
| } |
| } |
| }} |
| } |
| |
| type component MTC { |
| } |
| |
| external function enc_Window (in Window p_window) return octetstring |
| with {extension "prototype(convert) encode (XER:XER_EXTENDED)"} |
| |
| testcase tc_createMsg2MeasXTDP_encdec() runs on MTC{ |
| var octetstring vl_window := enc_Window(c_xtdp_window) |
| log(vl_window) |
| var charstring vl_windowAsChar := oct2char(vl_window) |
| log(vl_windowAsChar) |
| var XTDP_Message vl_msgResp := { |
| transactionID := omit, |
| choice := { |
| xTDP_Responses := {xTDP_Response_list := { |
| { |
| requestId := 18, |
| responseCode := success, |
| argument := vl_windowAsChar, |
| errorSource := omit, |
| errorCode := omit, |
| errorMessage := omit |
| } |
| } |
| } |
| } |
| } |
| var octetstring vl_msgDec := enc_XTDP_Message(vl_msgResp) |
| log(vl_msgDec) |
| setverdict ( pass ); |
| } |
| |
| //const charstring c_msgLayoutResp := "<xul:XTDP-Message xmlns:xul='http://ttcn.ericsson.se/xtdp/xul/1.0'>\n\t<xul:XTDP_Responses>\n\t\t<xul:XTDP_Response>\n\t\t\t<xul:requestId>18</xul:requestId>\n\t\t\t<xul:responseCode>success</xul:responseCode>\n\t\t\t<xul:argument><xul:window xul:height='386.000000' xul:id='EPTF_Main_Window' xul:orient='vertical' xul:title='TTCN constructed window' xul:width='820.000000' xmlns:xul='http://ttcn.ericsson.se/xtdp/xul/1.0'>\n\t<xul:hbox xul:id='EPTF_Main_hbox_Textboxes' xul:orient='vertical'/>\n\t<xul:tabbox xul:flex='1.000000' xul:id='EPTF_Main_Tabbox'>\n\t\t<xul:Tabs>\n\t\t\t<xul:Tab xul:id='bubuTab' xul:label='bubu'/>\n\t\t\t<xul:Tab xul:id='tab2' xul:label='sec tab'/>\n\t\t</xul:Tabs>\n\t\t<xul:Tabpanels>\n\t\t\t<xul:Tabpanel xul:id='bubuTab' xul:orient='vertical'>\n\t\t\t\t<xul:hbox xul:id='EPTF_Main_hbox' xul:orient='horizontal'>\n\t\t\t\t\t<xul:hbox xul:id='EPTF_Main_hbox_labels' xul:orient='vertical'>\n\t\t\t\t\t\t<xul:label xul:id='refreshClock' xul:value='Time elapsed since Test was started: 0.0'/>\n\t\t\t\t\t\t<xul:label xul:id='status' xul:value='This text will be replaced runtime.'/>\n\t\t\t\t\t</xul:hbox>\n\t\t\t\t\t<xul:hbox xul:id='EPTF_Main_hbox_buttons' xul:orient='horizontal'>\n\t\t\t\t\t\t<xul:spacer xul:flex='1.000000'/>\n\t\t\t\t\t\t<xul:button xul:flex='0.010000' xul:id='EPTF_snapshot_button' xul:label='Snapshot'/>\n\t\t\t\t\t\t<xul:spacer xul:flex='0.000000'/>\n\t\t\t\t\t\t<xul:button xul:flex='0.010000' xul:id='EPTF_exit_ttcn_button' xul:label='Exit TTCN'/>\n\t\t\t\t\t</xul:hbox>\n\t\t\t\t</xul:hbox>\n\t\t\t</xul:Tabpanel>\n\t\t\t<xul:Tabpanel xul:id='tab2' xul:orient='vertical'/>\n\t\t</xul:Tabpanels>\n\t</xul:tabbox>\n\t<xul:tree xul:id='tree1' xul:rows='4.000000'>\n\t\t<xul:treecols>\n\t\t\t<xul:Treecol xul:flex='1.000000' xul:id='col1' xul:label='column' xul:widgetType='floatField'/>\n\t\t\t<xul:Treecol xul:flex='1.000000' xul:id='col2' xul:label='column' xul:widgetType='checkBox'/>\n\t\t</xul:treecols>\n\t\t<xul:Treechildren>\n\t\t\t<xul:Treeitem>\n\t\t\t\t<xul:Treerow>\n\t\t\t\t\t<xul:Treecell xul:id='cellFloat' xul:label='bubuCellFloat'/>\n\t\t\t\t\t<xul:Treecell xul:label=''/>\n\t\t\t\t</xul:Treerow>\n\t\t\t\t<xul:Treerow>\n\t\t\t\t\t<xul:Treecell xul:label=''/>\n\t\t\t\t\t<xul:Treecell xul:id='cellBoxxx' xul:label='bubuCell' xul:tooltiptext='cell to connect data'/>\n\t\t\t\t</xul:Treerow>\n\t\t\t\t<xul:Treerow>\n\t\t\t\t\t<xul:Treecell xul:label='' xul:tooltiptext='This is an unnamed cell connected to the cell two rows upper'/>\n\t\t\t\t\t<xul:Treecell xul:label=''/>\n\t\t\t\t</xul:Treerow>\n\t\t\t\t<xul:Treerow>\n\t\t\t\t\t<xul:Treecell xul:label='' xul:tooltiptext='This is an unnamed cell connected to the cell two rows upper'/>\n\t\t\t\t\t<xul:Treecell xul:label=''/>\n\t\t\t\t</xul:Treerow>\n\t\t\t</xul:Treeitem>\n\t\t</xul:Treechildren>\n\t</xul:tree>\n\t<xul:chart xul:axisXType='linear' xul:axisYType='linear' xul:backgroundColor='RGB:180:200:200' xul:foregroundColor='Black' xul:gridColor='black' xul:gridX='true' xul:gridY='false' xul:id='chart1' xul:title='Demo Chart 01' xul:zoomable='true'>\n\t\t<xul:trace xul:color='red' xul:id='trace01' xul:name='Red line'/>\n\t\t<xul:trace xul:color='blue' xul:id='trace02' xul:name='Blue line'/>\n\t</xul:chart>\n\t<xul:toolbar xul:id='EPTF_Main_Toolbar' xul:placement='south'/>\n</xul:window>\n\n</xul:argument>\n\t\t</xul:XTDP_Response>\n\t</xul:XTDP_Responses>\n</xul:XTDP-Message>\n\n" |
| modulepar integer tsp_encdecCount := 50000 |
| |
| testcase tc_measXTDP_encdec() runs on MTC{ |
| var XTDP_Message vl_msg, vl_msg2 |
| //Create the message 2b encoded |
| vl_msg.transactionID := omit |
| vl_msg.choice.xTDP_AddRequests.xTDP_AddRequest_list[0].parentWidgetId := omit |
| vl_msg.choice.xTDP_AddRequests.xTDP_AddRequest_list[0].requestId := 1 |
| vl_msg.choice.xTDP_AddRequests.xTDP_AddRequest_list[0].widgets.window := c_xtdp_window |
| |
| var octetstring vl_str, vl_layout |
| timer t |
| //Measure |
| t.start( 99999.9 ) |
| for ( var integer vl_i := 0; vl_i < tsp_encdecCount ; vl_i := vl_i+1 ) |
| { |
| vl_str := enc_XTDP_Message(vl_msg) |
| } |
| var float vl_duration := t.read |
| t.stop |
| action("Duration of ",tsp_encdecCount," encoding add widgets request: ",vl_duration) |
| //Create 2nd message 2b decoded |
| var XTDP_Message vl_msgSimple |
| vl_msgSimple.transactionID := omit |
| vl_msgSimple.choice.xTDP_Responses.xTDP_Response_list[0].requestId := 18 |
| vl_msgSimple.choice.xTDP_Responses.xTDP_Response_list[0].responseCode := success |
| vl_msgSimple.choice.xTDP_Responses.xTDP_Response_list[0].argument := omit |
| vl_msgSimple.choice.xTDP_Responses.xTDP_Response_list[0].errorSource := omit |
| vl_msgSimple.choice.xTDP_Responses.xTDP_Response_list[0].errorCode := omit |
| vl_msgSimple.choice.xTDP_Responses.xTDP_Response_list[0].errorMessage := omit |
| var octetstring vl_resp := enc_XTDP_Message(vl_msgSimple) |
| t.start( 99999.9 ) |
| for ( var integer vl_i := 0; vl_i < tsp_encdecCount ; vl_i := vl_i+1 ) |
| { |
| dec_XTDP_Message(vl_resp,vl_msg2) |
| } |
| vl_duration := t.read |
| t.stop |
| action("Duration of ",tsp_encdecCount," decoding a simple response: ",vl_duration) |
| //Window |
| t.start( 99999.9 ) |
| for ( var integer vl_i := 0; vl_i < tsp_encdecCount ; vl_i := vl_i+1 ) |
| { |
| vl_layout := enc_Window(c_xtdp_window) |
| } |
| vl_duration := t.read |
| t.stop |
| action("Duration of ",tsp_encdecCount," encoding a complex window XUL: ",vl_duration) |
| log(vl_msg2) |
| } |
| |
| const Hbox c_MainWidget := { |
| disabled := omit, |
| fixedposition := omit, |
| flex := omit, |
| id := "EPTF_Main_hbox", |
| orientation := horizontal, |
| scrollable := omit, |
| embeddedwidgets := {embeddedwidget_list :={ |
| { |
| hbox := { |
| disabled := omit, |
| fixedposition := omit, |
| flex := omit, |
| id := "EPTF_Main_hbox_labels", |
| orientation := vertical, |
| scrollable := omit, |
| embeddedwidgets := {embeddedwidget_list :={ |
| { |
| label_ := { |
| disabled := omit, |
| flex := omit, |
| id := "refreshClock", |
| style := omit, |
| tooltiptext := omit, |
| value_ := "Time elapsed since Test was started: 0.0", |
| externaldata := omit |
| } |
| }, |
| { |
| label_ := { |
| disabled := omit, |
| flex := omit, |
| id := "status", |
| style := omit, |
| tooltiptext := omit, |
| value_ := "This text will be replaced runtime.", |
| externaldata := omit |
| } |
| } |
| }} |
| } |
| }, |
| { |
| hbox := { |
| disabled := omit, |
| fixedposition := omit, |
| flex := omit, |
| id := "EPTF_Main_hbox_buttons", |
| orientation := horizontal, |
| scrollable := omit, |
| embeddedwidgets := {embeddedwidget_list :={ |
| { |
| spacer := { |
| flex := 1.0, |
| id := omit |
| } |
| }, |
| { |
| button := { |
| /*checked :=*/ omit,//BOOLEAN OPTIONAL, |
| /*disabled :=*/ true, |
| /*disabledongui :=*/ omit, |
| /*flex :=*/ omit, |
| /*id :=*/ "button1", |
| /*imageid :=*/ omit, |
| /*label_ :=*/ "Snapshot", |
| /*tooltiptext :=*/ omit, |
| /*type_ :=*/ omit, |
| /*externaldata :=*/ omit//XSD.String OPTIONAL, |
| //image := omit, |
| } |
| }, |
| { |
| spacer := { |
| flex := 0.0, |
| id := omit |
| } |
| }, |
| { |
| button := { |
| /*checked :=*/ omit,//BOOLEAN OPTIONAL, |
| /*disabled :=*/ true, |
| /*disabled :=*/ omit, |
| /*flex :=*/ omit, |
| /*id :=*/ "button2", |
| /*imageid :=*/ omit, |
| /*label_ :=*/ "Exit TTCN", |
| /*tooltiptext :=*/ omit, |
| /*type_ :=*/ omit, |
| /*externaldata :=*/ omit//XSD.String OPTIONAL, |
| //image := omit, |
| } |
| } |
| }} |
| } |
| } |
| }} |
| } |
| |
| testcase tc_XTDP_loop() runs on MTC{ |
| var XTDP_Message vl_msg, vl_msg2 |
| //Create the message 2b encoded |
| vl_msg.transactionID := omit |
| vl_msg.choice.xTDP_AddRequests.xTDP_AddRequest_list[0].parentWidgetId := omit |
| vl_msg.choice.xTDP_AddRequests.xTDP_AddRequest_list[0].requestId := 1 |
| vl_msg.choice.xTDP_AddRequests.xTDP_AddRequest_list[0].widgets.hbox := c_MainWidget |
| action(vl_msg) |
| var octetstring vl_ret := enc_XTDP_Message(vl_msg) |
| action(vl_ret) |
| var integer vl_decRet := dec_XTDP_Message(vl_ret, vl_msg2) |
| log(vl_decRet) |
| if(match(vl_msg,vl_msg2)){ |
| setverdict(pass) |
| }else{ |
| setverdict(fail, match(vl_msg,vl_msg2)) |
| } |
| } |
| |
| testcase tc_XTDP_loopWindow() runs on MTC{ |
| var XTDP_Message vl_msg, vl_msg2 |
| //Create the message 2b encoded |
| vl_msg.transactionID := omit |
| vl_msg.choice.xTDP_AddRequests.xTDP_AddRequest_list[0].parentWidgetId := omit |
| vl_msg.choice.xTDP_AddRequests.xTDP_AddRequest_list[0].requestId := 1 |
| vl_msg.choice.xTDP_AddRequests.xTDP_AddRequest_list[0].widgets.window := c_xtdp_window |
| |
| action(vl_msg) |
| var octetstring vl_ret := enc_XTDP_Message(vl_msg) |
| action(vl_ret) |
| var integer vl_decRet := dec_XTDP_Message(vl_ret, vl_msg2) |
| log(vl_decRet) |
| if(match(vl_msg,vl_msg2)){ |
| setverdict(pass) |
| }else{ |
| setverdict(fail, match(vl_msg,vl_msg2)) |
| } |
| } |
| |
| control{ |
| execute(tc_createMsg2MeasXTDP_encdec()); |
| //execute(tc_measXTDP_encdec()); |
| execute(tc_XTDP_loop()) |
| execute(tc_XTDP_loopWindow()) |
| } |
| } // end of module |