/***************************************************
 ** @author   STF 572 (updated by TTF T014)
 ** @version  0.0.1
 ** @purpose  1:16.1.2,  Ensure that the IUT recognizes any2unistr predefined functions with format "canonical"
 ** @verdict  pass accept, ttcn3verdict:pass

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

/* The following requirements are tested:
    C.1.33: If the actual value of the format parameter is different from the empty string and "canonical", the format of the result
produced by the function is either tool-specific if the tool supports the specified custom format or it is the same as the
string produced by the log operation (i.e. the same as if the parameter value was the empty string).
*/

module Sem_160102_predefined_functions_109 {

        type record MyRec {
        integer field1,
        boolean field2,
        integer field3 optional
    };
    type component GeneralComp {
    }

    testcase TC_Sem_160102_predefined_functions_109 () runs on GeneralComp {

        var template MyRec v_4 := {1,false,-};

        if(match(any2unistr(v_4, "SometingElse"), pattern "\s#(,)\{\s#(,)field1\s#(,):=\s#(,)1\s#(,)\,\s#(,)field2\s#(,):=\s#(,)false\s#(,)\,\s#(,)field3\s#(,):=\s#(,)(\-)\s#(,)\}\s#(,)" )) {
            setverdict(pass,"Result: ",any2unistr(v_4));
        } else {
            setverdict(fail,"Result is: ",any2unistr(v_4), " Expected:{ field1 := 1, field2 := false, field3 := UNINITIALIZED }");
        }
   }

    control{
        execute(TC_Sem_160102_predefined_functions_109());

    }

}
