Skip to content
JohnnyT edited this page Jul 19, 2020 · 3 revisions

SCXML 03.02

01_required_state.yaml

---
# Blank statechart
statechart:

conformance_tests:
- name: State child required
  reference: https://www.w3.org/TR/scxml/#scxml
  description: >-
    A conformant Statechart MUST have at least one child state.

  original_description: >-
    A conformant SCXML document must have at least one <state>, <parallel> or <final> child.

  is_conformant: false
  error: At least one state is required

02_initial_attribute.yaml

---
statechart:
  initial: greeting
  states:
  - id: greeting
  - id: error

initial_tests:
- name: Enter the states of the 'initial' attribute
  reference: https://www.w3.org/TR/scxml/#scxml
  description: >-
    At system initialization time, the Machine MUST enter the states specified by the 'initial' attribute, if it is present.

  original_description: >-
    At system initialization time, the SCXML Processor must enter the states specified by the 'initial' attribute, if it is present.

  expected:
    configuration: greeting
    running: true

03_first_state.yaml

---
statechart:
  initial: greeting
  states:
  - id: greeting
  - id: error

initial_tests:
- name: Enter first state in document order
  reference: https://www.w3.org/TR/scxml/#scxml
  description: >-
    At system initialization time if the 'initial' attribute is not present, the Machine MUST enter the first state in document order.
  original_description: >-
    At system initialization time, ... if [the 'initial' attribute] is not present, the Processor must enter the first state in document order.

  expected:
    configuration: greeting
    running: true

04_stop_running_on_final.yaml

---
statechart:
  states:
  - id: goodbye
    type: final

initial_tests:
- name: Stop running on top level final state
  reference: https://www.w3.org/TR/scxml/#scxml
  description: >-
    The Machine MUST stop running when reaching a top level Final State.

  original_description: >-
    The SCXML processor must terminate processing when the state machine reaches this state. See 3.7 <final> for details.

  expected:
    configuration: goodbye
    running: false
Clone this wiki locally