[ Identification | Description | Examples | Input parameters | Links ]
Unittest_INHERIT_OVERRIDE Instrument
Unit test for whole-component inheritance, see
docs/GRAMMAR/ADR-records/ADR_20261007_GRAMMAR_FIXES.md
(same rule as mccode-antlr, mccode-dev/mccode-antlr#321).
Local components: Unittest_IO_parent absorbs particles with x>0. Its
children, DEFINE COMPONENT ... INHERIT Unittest_IO_parent:
- Unittest_IO_cancel writes an empty TRACE %{ %}: replaces the parent's
TRACE, absorbs nothing. Before, an empty block counted as "not written"
and the parent's TRACE was used.
- Unittest_IO_keep writes no sections: inherits the parent's TRACE.
- Unittest_IO_extend writes TRACE INHERIT Unittest_IO_parent EXTEND %{..%}:
the parent's TRACE followed by more code (absorbs x>0 and y>0). It also
uses INHERIT within USERVARS.
- Unittest_IO_noinit writes an empty INITIALIZE EXTEND %{ %}: keeps the
parent's DECLARE and TRACE but not its INITIALIZE (io_val stays 0, so
its TRACE halves the weight). "Inherit everything but one section".
One unit of intensity is emitted uniformly from a 1x1 m square:
AfterCancel_I = 1, AfterKeep_I = 0.5, AfterExtend_I = 0.25,
AfterNoInit_I = 0.125.
| Name | Unit | Description | Default |
| Pp0 | 1 | Dummy input parameter used internally | 0 |
Unittest_INHERIT_OVERRIDE.instr.
[ Identification | Description | Examples | Input parameters | Links ]
Generated for mcstas 3.10.0