Skip to content

Unit checks

mkraska edited this page Mar 12, 2024 · 4 revisions

It is desirable to have unit checks for the meclib objects and the feedback functions.

  • Integrity check when STACK or JSXGraph are updated
  • Documentation of the expected behaviour

STACK questions as unit tests

Some feedback functions have unit tests. These are STACK questions with name QAxx, found in the repository.

Some of them can be found in the Demo Moodle Course.

They compare the calculated feedback texts with reference texts. This can be done using the AlgEquiv answer test in response trees.

To compare castext() expressions, STACK 4.4.2 is required.

Using s_assert()

See Stack documentation

CI in STACK

Tryout Space

In order to try code snippets in jsfiddle,

  1. copy the code from the wiki page to the clipboard
  2. follow the link for the JSXGraph version you want to try
  3. Replace the code in the HTML section (contents of <p hidden id="init">) with the content of the clipboard
Clone this wiki locally