From Scott Moore’s Standard Pascal site, it is his work, not mine!
The PAT and PRT
The PAT or Pascal acceptance test is a series of tests in one file that go through each feature of ISO 7185 Pascal. If a ISO 7185 Pascal implementation can compile and run this correctly, then it is substantially compliant with ISO 7185 Pascal.
There are two types of tests, the PAT and the PRT, or Pascal Rejection Test. The PAT test should compile and run correctly, and is a “positive” indication that the implementation compiles standard structures and gives standard results. The PRT is the opposite. It is designed to either fail to compile or generate runtime errors or both. It is a “negative” test that makes sure that the implementation rejects non-standard structures. The PAT is represented here.
Relationship to the BSI test suite
The BSI test suite (covered in the Pascal validation Suite) includes both positive and negative testing, and appeared in original version in the Pascal User’s Group, Issue 16.
The PAT was created entirely by me (scott Moore) and is original work. However, I also donate this to public domain. It was created back in the early 1990’s, and used to validate both mine and other Pascal compilers. The PAT effectively replaces the positive testing side of the BSI. I also intend to create a negative test, the PRT, and also make that public domain.
Further, the PAT and PRT form a collection point for tests, including test that were made in reaction to the failures seen while running the BSI tests. In other words, if the BSI test found a failure, then an equivalent test was added to the PAT (not copied from the BSI!). This is a work in progress, so not all failure points have yet been addressed.
Thus, the PAT and PRT are designed to be full replacements for the BSI tests.
Format and working of the PAT
The PAT is designed to execute a small amount of code, then print the results. Each “test point” tests one feature of ISO 7185 Pascal and is numbered according to type and sequence. Here is an example from the test:
write('Control6: '); if true then write('yes') else write('no'); writeln(' s/b yes');
This prints:
Control 6: yes s/b yes
So you see the number and type of the test, control structures number 6, the result, ‘yes’, and finally what the result should be.
The PAT is designed to be verified manually, that is, you read it and check that the printed results equal the “should be” column. The PAT can be easily automated for regression purposes by redirecting the output to a file, then comparing a saved “gold” version of the result file to the current file.