Commit 92f117c3 authored by Matthias Simon's avatar Matthias Simon
Browse files

Update core language tests

parent 75cd4049
Loading
Loading
Loading
Loading
+3 −3
Original line number Original line Diff line number Diff line
@@ -8,7 +8,7 @@


module NegSem_1400_procedure_signatures_003 {
module NegSem_1400_procedure_signatures_003 {


    signature p_Sig1_001(in integer p_par1, out integer p_par2, inout integer p_par3) return port // Not allowed: only data types are allowed
    signature p_Sig1_001(in integer p_par1, out integer p_par2, inout integer p_par3) return verdicttype // Not allowed: only data types are allowed
	exception (charstring);  //execption is a string
	exception (charstring);  //execption is a string




@@ -47,7 +47,7 @@ module NegSem_1400_procedure_signatures_003 {
		}
		}
}
}


	testcase TC_NegSem_1400_procedure_signatures_003() runs on GeneralComp system GeneralComp {
	testcase TC_Sem_1400_procedure_signatures_001() runs on GeneralComp system GeneralComp {


		var GeneralComp server := GeneralComp.create("RemoteProcedure Service");
		var GeneralComp server := GeneralComp.create("RemoteProcedure Service");
	   var GeneralComp client := GeneralComp.create("RemoteProcedure Client");
	   var GeneralComp client := GeneralComp.create("RemoteProcedure Client");
@@ -73,7 +73,7 @@ module NegSem_1400_procedure_signatures_003 {
   }
   }


    control{
    control{
        execute(TC_NegSem_1400_procedure_signatures_003());
        execute(TC_Sem_1400_procedure_signatures_001());
    }
    }


}
}
 No newline at end of file
+5 −9
Original line number Original line Diff line number Diff line
@@ -19,19 +19,15 @@ module Sem_1512_TheOmitOperation_001 {
		boolean b optional
		boolean b optional
	}
	}


	template ExampleType m_originalOmit := omit;
	template(omit) ExampleType m_targetOmit := omit(m_originalOmit);

	testcase TC_Sem_1512_TheOmitOperation_001() runs on GeneralComp {
	testcase TC_Sem_1512_TheOmitOperation_001() runs on GeneralComp {


		var template(omit) ExampleType v_omit;
		template ExampleType m_originalOmit := omit;

		template(omit) ExampleType m_targetOmit := omit(m_originalOmit);
		v_omit := m_targetOmit;


		if ( ispresent(v_omit) ) {
		if (match(m_targetOmit, m_originalOmit)) {
			setverdict(fail);
		} else {
			setverdict(pass);
			setverdict(pass);
		} else {
			setverdict(fail);
		}
		}
	}
	}


+6 −9
Original line number Original line Diff line number Diff line
@@ -19,17 +19,13 @@ module Sem_1512_TheOmitOperation_002 {
		boolean b optional
		boolean b optional
	}
	}


	template ExampleType m_originalValue := {1, true};
	template(omit) ExampleType m_targetValue := omit(m_originalValue);

	testcase TC_Sem_1512_TheOmitOperation_002() runs on GeneralComp {
	testcase TC_Sem_1512_TheOmitOperation_002() runs on GeneralComp {
		var template(omit) ExampleType v_omit;


		v_omit := m_targetValue;
		template ExampleType m_originalValue := {1, true};


		if (match(valueof(v_omit.a), 1) and
		template(omit) ExampleType m_targetValue := omit(m_originalValue);
			match(ispresent(v_omit.b), true )

		   ) {
		if (match(m_targetValue, m_originalValue)) {
			setverdict(pass);
			setverdict(pass);
		} else {
		} else {
			setverdict(fail);
			setverdict(fail);
@@ -40,3 +36,4 @@ module Sem_1512_TheOmitOperation_002 {
		execute(TC_Sem_1512_TheOmitOperation_002());
		execute(TC_Sem_1512_TheOmitOperation_002());
	};
	};
}
}
+14 −13
Original line number Original line Diff line number Diff line
/***************************************************
/***************************************************
 * @author TTF 014
 ** @author   TTF 014
 * @version 0.0.1
 ** @version  0.0.1
 * @purpose 1:15.12, The present operation
 ** @purpose  1:15.12, The present operation
 * @verdict pass accept
 ** @verdict  pass accept
 ***************************************************/
 ***************************************************/

 /* The following requirements are tested:
 /* The following requirements are tested:
 * present restriction:
 * present restriction:
 * The present operatoion checks if a template instance fullfils conditions of the present template restriction.
 * The present operatoion checks if a template instance fullfils conditions of the present template restriction.
 */
 */

module Sem_1512_ThePresentOperation_001 {
module Sem_1512_ThePresentOperation_001 {

	type component GeneralComp {
	type component GeneralComp {
  }
  }


@@ -16,16 +19,14 @@ module Sem_1512_ThePresentOperation_001 {
		integer a, boolean b optional
		integer a, boolean b optional
	}
	}


	template ExampleType m_originalValue := {1, true}
	testcase TC_Sem_1512_ThePresentOperation_001()
	template(present) ExampleType m_targetValue := present(m_originalValue);
		runs on GeneralComp {


	testcase TC_Sem_1512_ThePresentOperation_001() runs on GeneralComp {
		template ExampleType m_originalValue := {1, true}
		var template(present) ExampleType v_present;


		v_present := m_targetValue;
		template(present) ExampleType m_targetValue := present(m_originalValue);


		if (match(valueof(v_present.a), 1) and
		if (match(m_targetValue, m_originalValue)) {
			match(valueof(v_present.b), true)) {
			setverdict(pass);
			setverdict(pass);
		} else {
		} else {
			setverdict(fail);
			setverdict(fail);