tmf : fix the 'Not' condition in TmfXmlCondition
[deliverable/tracecompass.git] / tmf / org.eclipse.tracecompass.tmf.analysis.xml.core.tests / test_xml_files / test_valid / test_conditions.xml
index 5747c5f0edf86059973b273b2bf84fbfb5c857c6..afe39b88bc7c495e0562095d8c1106349ad3b167 100644 (file)
 <tmfxml xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:noNamespaceSchemaLocation="xmlDefinition.xsd">
 
+<!-- ***************************************************************************
+* The following represents the state of the attributes in the system after the
+* analysis.
+*
+* n corresponds to a null state value
+*
+* Timestamp                    |       1       |       3       |       5       |       7       |
+* -events and field value-
+* ev.test                      |       10                              20
+* ev.test1                     |                       100                             200
+* -states-
+* test                         |       1                               0
+* test1                                |       n               0                               1
+* checkpoint           |       0                               1               0
+* or_three_operands    |       1                               0               1
+* not_operand          |       0                               1               0
+*
+*************************************************************************** -->
+
        <stateProvider id="test.xml.conditions" version="1">
                <eventHandler eventName="test">
                        <stateChange>
                                        </and>
                                </if>
                                <then>
-                                       <stateAttribute type="constant" value="or_three_operands" />
+                                       <stateAttribute type="constant" value="and_three_operands" />
                                        <stateValue type="long" value="0" />
                                </then>
                                <else>
-                                       <stateAttribute type="constant" value="or_three_operands" />
+                                       <stateAttribute type="constant" value="and_three_operands" />
                                        <stateValue type="long" value="1" />
                                </else>
                        </stateChange>
                </eventHandler>
+               <eventHandler eventName="*">
+                       <stateChange>
+                               <if>
+                                       <not>
+                                               <condition>
+                                                       <stateAttribute type="constant" value="and_three_operands" />
+                                                       <stateValue type="long" value="1" />
+                                               </condition>
+                                       </not>
+                               </if>
+                               <then>
+                                       <stateAttribute type="constant" value="not_operand" />
+                                       <stateValue type="long" value="1" />
+                               </then>
+                               <else>
+                                       <stateAttribute type="constant" value="not_operand" />
+                                       <stateValue type="long" value="0" />
+                               </else>
+                       </stateChange>
+               </eventHandler>
        </stateProvider>
 </tmfxml>
\ No newline at end of file
This page took 0.025995 seconds and 5 git commands to generate.