/***************************************************
 ** @author   STF 521, updated by STF 572
 ** @version  0.0.1
 ** @purpose  1:6.1.1.1, Access bitstring elements
 ** @verdict  pass reject
 ***************************************************/
/* The following requirements are tested:
 * Only single elements of the string may be accessed.
 * Trying to assign strings with length 0 or more than 1
 * to a string element using the array-like syntax shall
 * cause an error.
*/

module NegSem_06010101_AccessStringElements_001 {

    type component GeneralComp {}

    testcase TC_NegSem_06010101_AccessStringElements_001() runs on GeneralComp {
        var bitstring v_b := '100010'B;
        v_b[1] := '11'B;    //error: only individual elements can be accessed
    	if (v_b == '100001'B){
    		setverdict(pass);
    	}
    	else {
    		setverdict(fail, "v_b:",v_b);
    	}
    }

    control{
        execute(TC_NegSem_06010101_AccessStringElements_001());
    }
}