/***************************************************
 ** @author   STF 470
 ** @version  0.0.1
 ** @purpose  1:10, Record type used as a constant with optional fields
 ** @verdict  pass accept, ttcn3verdict:pass
 ***************************************************/
module Sem_10_Constants_007 {

    type record MyRecordType
    {
        bitstring field1,
        boolean field2 optional,
        charstring field3 optional

    };

    type component GeneralComp {
    }

    testcase TC_Sem_10_Constants_007() runs on GeneralComp {
        const MyRecordType c_mRT3 := {field1 := '1010'B,
                                      field2 := -,
                                      field3 := -};

        if (not isbound(c_mRT3.field2) and
            not isbound(c_mRT3.field3) and
            match(c_mRT3.field1, '1010'B))
            {
                setverdict(pass);
            }
            else {
                setverdict(fail);
            }
    }

    control{
        execute(TC_Sem_10_Constants_007());
    }
}