/******************************************************************************
- * Copyright (c) 2000-2014 Ericsson Telecom AB
+ * Copyright (c) 2000-2016 Ericsson Telecom AB
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Balasko, Jeno
+ * Baranyi, Botond
+ * Delic, Adam
+ * Kovacs, Ferenc
+ * Raduly, Csaba
+ * Szabados, Kristof
+ * Szabo, Janos Zoltan – initial implementation
+ *
******************************************************************************/
module TtemplateRec {
x3:={ x1:={f1:=8,f2:=1.2}, x2:={f1:=6,f2:=1.2}, x3:=temp };
//match
if (match(x1,templateRec_tList)) {setverdict(pass);}
- else {setverdict(fail);}
+ else {setverdict(fail, 1);}
//no match: out of list
if (not(match(x2,templateRec_tList))) {setverdict(pass);}
- else {setverdict(fail);}
+ else {setverdict(fail, 2);}
//no match: other field
if (not(match(x3,templateRec_tList))) {setverdict(pass);}
- else {setverdict(fail);}
+ else {setverdict(fail, 3);}
}
testcase templateRecComp() runs on templateRec_mycomp {
x3:={ x1:={f1:=2,f2:=1.2}, x2:={f1:=7,f2:=1.2}, x3:=temp };
//match
if (match(x1,templateRec_tComp)) {setverdict(pass);}
- else {setverdict(fail);}
+ else {setverdict(fail, 1);}
//no match: in the list
if (not(match(x2,templateRec_tComp))) {setverdict(pass);}
- else {setverdict(fail);}
+ else {setverdict(fail, 2);}
//no match: other field
if (not(match(x3,templateRec_tComp))) {setverdict(pass);}
- else {setverdict(fail);}
+ else {setverdict(fail, 3);}
}
testcase templateRecOmit() runs on templateRec_mycomp {
template R tr2 := { i := 1, str := complement( omit , omit ) }
template R trc := cr; // HQ46602
+// Note: this tests legacy behavior and requires the -M compiler option!
testcase MTTSM00015947() runs on templateRec_mycomp
{
if (not match(cr, tRrec1)) { setverdict(fail); }