/***************************************************
 ** @author   STF 584
 ** @version  0.0.2
 ** @purpose  1:B.1.3.3, Verify restriction on individual members of all from operand in permutation
 ** @verdict  pass reject
 ***************************************************/

// The following requirement is tested:
// The template referenced in the all from clause as a whole shall not resolve into a matching mechanism other than a SpecificValue (see clause B.1.1), and it shall not contain permutations

module NegSem_B010303_permutation_006 {

	type record of integer RoI;

	template RoI t_source := { 1, permutation(2, 3) }
	// The source template contains a matching mechanism inside value (permutation)

	// that is not mentioned as a valid content of the all from operand in
	// B.1.3.3. restriction c
	template RoI t_perm1 := {permutation( all from t_source, *) };


	type component GeneralComp {
	}

	testcase TC_NegSem_B010303_permutation_006() runs on GeneralComp {
		if (match({ 1, 4, 2, 3 }, t_perm1)) {
			setverdict(pass);
		} else {
			setverdict(fail);
		}
	}

	control{
	    execute(TC_NegSem_B010303_permutation_006());
	}

}
