ACATS 4.1 User's Guide
4.5 General Standards
ACATS tests were developed to a general set of standards.
To promote a variety of code styles and usage idioms in the tests, standards
were not necessarily rigorously enforced but were used as guidelines
for test writers. A maximum line length of 79 characters was used to
enhance electronic distribution of tests (except when specific testing
requirements dictated otherwise, usually in .dep and .tst files). Tests
tend to be about 120 executable lines long, though many tests deviate
from this norm (either longer or shorter) to achieve a design that focuses
on the objective and a readable, maintainable test. Sometimes complex
objectives have been divided into sub-objectives to achieve complete
coverage in comprehensible, maintainable tests. Some tests check multiple
objectives; in other cases, sub-objectives are checked in separate tests.
Legacy tests use only the basic 55-character set
(26 capital letters, 10 digits, and 19 punctuation marks). Unless there
is a specific test requirement, numeric values are in the range (-2048..2047),
which can be represented in 12 bits. Numeric values are generally in
the range (-128..127). Modern tests use both upper and lower case letters
and may use larger numeric values (but within the range (-65536..65535)
except in rare cases).
Legacy tests tend to use as few Ada features as necessary
to write a self-checking executable test that can be read and maintained.
Modern tests tend to exhibit a usage-oriented style, employing a rich
assortment and interaction of features and exemplifying the kind of code
styles and idioms that compilers may encounter in practice.
In modern tests, Ada reserved words are entirely
in lower case. Identifiers normally have their initial letter capitalized.
Every attempt has been made to choose meaningful identifiers. In B class
tests, identifier names often provide a clue to the specific case or
situation under test. In C class tests, identifiers are normally chosen
to help document the test design or the intent of the code.
Modern executable tests generally provide some visual
separation of those test elements that focus on conformance issues from
those that govern the flow of a test. For example, there is frequently
a need to establish preconditions for a test and examine post-conditions
after a section of test code has executed. To distinguish between constructs
(types, objects, etc.) that are part of the test code and those that
are artifacts of the testing process (e.g., pre-, post-conditions), the
latter have TC_ prefixed to the identifier name. This prefix
is shorthand for Test_Control.