TestSlidingWindow package
Requirements.Internal.TestSlidingWindow
ยท source
Test functions of package SlidingWindow (assert the durations of hand-computed cases)
Extends Modelica.Icons.Package
Test functions of the sliding-window buffer SlidingWindow:
testMaxDuration tests
maxDuration and testAccumulatedDuration
tests accumulatedDuration, each on seven buffers whose durations are computed by hand, and
testFullBuffer tests
push on a buffer that overflows. Each function prints the computed and the expected values and stops
with an assertion at the first wrong one.
They are not models and are not run by the examples of the library; call them from the command line or a script of
the tool after a change to SlidingWindow.
Contents
| Name | Kind | Description | |
|---|---|---|---|
| testMaxDuration | impure function | Test SlidingWindow.maxDuration on seven cases with known results | |
| testAccumulatedDuration | impure function | Test SlidingWindow.accumulatedDuration on seven cases with known results | |
| testFullBuffer | impure function | Test SlidingWindow.push on a buffer that overflows |