TestSlidingWindow package

Requirements.Internal.TestSlidingWindow  ยท source

Icon of TestSlidingWindow

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

NameKindDescription
testMaxDurationimpure functionTest SlidingWindow.maxDuration on seven cases with known results
testAccumulatedDurationimpure functionTest SlidingWindow.accumulatedDuration on seven cases with known results
testFullBufferimpure functionTest SlidingWindow.push on a buffer that overflows