/***************************************************
 ** @author   STF 548
 ** @version  0.0.1
 ** @purpose  1:16.1.2, Ensure that predefined 'encvalue_o' function works properly in case of encoding to octetstring
 ** @verdict  pass accept, ttcn3verdict:pass

 ***************************************************/

/* The following requirements are tested:
The encvalue_o function encodes a value or template into an octetstring. When the actual parameter that is passed
to inpar is a template, it shall resolve to a specific value.
- C.5.5 The encoding to octetstring function
*/


module Sem_160102_predefined_functions_101 {

    type component GeneralComp {

    }

    testcase TC_Sem_160102_predefined_functions_101 () runs on GeneralComp {

    var integer v_int := 10 with { variant "32 bit" };
    var octetstring v_ref := '0A000000'O;	// expected encoded value

    //Encoding:
    var octetstring v_enc := encvalue_o(v_int); //encode to octetstring

    if (match(v_enc, v_ref)) {
          setverdict(pass);
    } else {
          setverdict(fail,v_enc, v_ref);
    }

   }

    control{

        execute(TC_Sem_160102_predefined_functions_101());

    }

}