Introduction

This document describes the B2000++ example cases and test cases. It replaces the Test Cases Documentation and the Examples Documentation of B2000++ version 4.3 and earlier. all example and test cases are distributed with the b2000pp_data package:

  • Examples cases are stored under b2000pp/tests/system_tests/examples.

  • Verification cases are stored under b2000pp/tests/system_tests/verification.

  • The test cases running with Python2 only are stored under b2000pp/tests/system_tests/test_cases.

All example and test cases are launched with the b2testrunner application. Some cases can be launched with make scripts if available. Specific data processing capabilities by the Simples module or the baspl++ post-processor are described in the text and also documented in the scripts.

To launch tests with the b2testrunner unit test application from a shell:

b2testrunner <path-to-tests>

To redirect output to a file:

b2testrunner  . >b2testrunner.out 2>&1

Tests can be executed concurrently with the -j option. Example: Run with 12 threads:

b2testrunner -j 12 .

Individual tests can also be launched with the b2testrunner application from their respective directories.

Some verification cases can also be executed with make. Check with the relevant directories, where additional descriptive text in README files can be found. The Makefile files found in the relevant directories usually contain the following targets:

  • Typing make with the default target in a shell usually runs the test as documented, by executing B2000++ with the relevant MDL input file.

  • To clean up the directory by removing the generated model database (a file with the extension .b2m) and other files and directories created by the test, type

    make clean
    

Test cases can easily be added to the test case suite. Adding tests should be limited to testing features not captured by one of the existing tests or to testing bugged features. While SMR maintains the ‘official’ test case suite, users can add tests to the sub-directory additional. For information on how to use the B2000++ test program and how to write tests and documentation, please refer to the B2000++ Programming Manual.