This is not a page about testing in Cubby in general, only a list of recipes for some specific situations. And it's likely to quickly become out of date.

Initialization tests

They are located in the tests/field directory, which contains the test_field_init command. That command has its own doc (available through the --help option).

Those test follows a very simple pattern:

  1. read a minimalist cubby configuration file like this one: tests/field/ file is located in the source directory.
  2. Assume it contains informations for the velocity fluid initialization and use that information to initialize a vector field.
  3. load a gold vector file located in the source directory. Which was initialized with the same configuration
  4. compare them, and fail or succeed depending on the difference. The difference does not have to be strictly null (we usually compare with a few epsilon) since some movement between spectral and real space are involved.

Since the test_field_init is linked against the cubby physical library, it can be used to test the initialization code in "real" condition.

To add a new test, you must:

Last modified 9 years ago Last modified on Jan 17, 2012 5:19:00 PM