fixed self-ref check to no longer display errors for omit values (bug 498430)
[deliverable/titan.core.git] / regression_test / boolOper / TboolOper.ttcn
index 61e2f50644321529ce8f53b74c8a05eb6f362d6f..515ffd2482149601986904f3d9980d91a93dccdc 100644 (file)
@@ -366,6 +366,18 @@ testcase boolShortCircuit() runs on boolOper_comptype {
   setverdict(pass);
 }
 
+type record MyRecord {
+  integer a optional
+}
+
+// comparing an optional record field to 'omit' in a boolean variable assignment (bug 498430)
+testcase boolCompEqOmit() runs on boolOper_comptype {
+  var MyRecord myRecord := { a := omit };
+  var boolean b := myRecord.a == omit;
+  if (b == true) { setverdict(pass); }
+  else { setverdict(fail); }
+}
+
 control {
   const boolean cl_1:=true;
   var boolean vl_1;
@@ -381,6 +393,7 @@ control {
   execute(boolSubtypes());
   execute(boolIsvalue());
   execute(boolShortCircuit());
+  execute(boolCompEqOmit());
 }
 
 }
This page took 0.02706 seconds and 5 git commands to generate.