Prolog Unit Tests
AllApplicationManualNameSummaryHelp

  • Documentation
    • Reference manual
    • Packages
      • Prolog Unit Tests
        • Introduction
        • A Unit Test box
        • Using separate test files
        • Running the test-suite
        • Tests and production systems
        • Controlling the test suite
        • Auto-generating tests
        • library(test_cover): Clause coverage analysis
        • Portability of the test-suite
        • Motivation of choices

3 Using separate test files

Test-units can be embedded in normal Prolog source-files. Alternatively, tests for a source-file can be placed in another file alongside the file to be tested. Test files use the extension .plt. The predicate load_test_files/1 can load all files that are related to source-files loaded into the current project.