/***************************************************
 ** @author   STF 521
 ** @version  0.0.1
 ** @purpose  1:6.1.1.1, Access bitstring elements
 ** @verdict  pass reject
 ***************************************************/
/* The following requirements are tested:
 * The index shall be between zero and the
 * length of the string minus one for retrieving
 * an element from a string. Trying to retrieve outside
 * this range shall cause an error.
*/

module NegSem_06010101_AccessStringElements_002 {

    type component GeneralComp {}

    testcase TC_NegSem_06010101_AccessStringElements_002() runs on GeneralComp {
        var octetstring v_b := '100010'O;
        v_b[6] := '01'O;    //error: index outside of range
    	if (v_b == '100001'O){
    		setverdict(pass);
    	}
    	else {
    		setverdict(fail, "v_b:",v_b);
    	}
    }

    control{
        execute(TC_NegSem_06010101_AccessStringElements_002());
    }
}