Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.
..
Failed to load latest commit information.
gps
lib
.gitignore
README
main.adb
raw_text_io.adb
raw_text_io.ads
reffy-abstract_handles.adb
reffy-abstract_handles.ads
reffy-handles.adb
reffy-handles.ads
reffy.adb
reffy.ads
util-io.adb
util-io.ads
util-strings-pool.adb
util-strings-pool.ads
util-strings.adb
util-strings.ads
util.ads
xreq-args.adb
xreq-args.ads
xreq-cli.adb
xreq-cli.ads
xreq-environment-handles.adb
xreq-environment-handles.ads
xreq-environment.adb
xreq-environment.ads
xreq-features-files-handles.adb
xreq-features-files-handles.ads
xreq-features-files.adb
xreq-features-files.ads
xreq-features-handles.ads
xreq-features-result-handles.adb
xreq-features-result-handles.ads
xreq-features-result.adb
xreq-features-result.ads
xreq-features.adb
xreq-features.ads
xreq-generator-ada05.adb
xreq-generator-ada05.ads
xreq-generator-c.adb
xreq-generator-c.ads
xreq-generator.adb
xreq-generator.ads
xreq-job.adb
xreq-job.ads
xreq-lang.adb
xreq-lang.ads
xreq-language-handles.adb
xreq-language-handles.ads
xreq-language.adb
xreq-language.ads
xreq-report.template.html
xreq-scenarios-handles.adb
xreq-scenarios-handles.ads
xreq-scenarios-result-handles.adb
xreq-scenarios-result-handles.ads
xreq-scenarios-result.adb
xreq-scenarios-result.ads
xreq-scenarios.adb
xreq-scenarios.ads
xreq-step_definition_list-handles.adb
xreq-step_definition_list-handles.ads
xreq-step_definition_list.adb
xreq-step_definition_list.ads
xreq-step_definitions-ada05.adb
xreq-step_definitions-ada05.ads
xreq-step_definitions-c.adb
xreq-step_definitions-c.ads
xreq-step_definitions-handles.ads
xreq-step_definitions.adb
xreq-step_definitions.ads
xreq-steps-handles.adb
xreq-steps-handles.ads
xreq-steps-result-handles.adb
xreq-steps-result-handles.ads
xreq-steps-result.adb
xreq-steps-result.ads
xreq-steps.adb
xreq-steps.ads
xreq.adb
xreq.ads
xreqlib-generic_features.adb
xreqlib-generic_features.ads
xreqlib-interface_scenarios.ads

README

Source Organisation
===================

Entry point: `Main` (`main.ads`, `main.adb`)

`Util` package
--------------

Contain utilitarian functions and procedures that are not specific to XReq.

- `Util.IO`: tools to read lines and files in `Unbounded_String`s
- `Util.Strings`: tools to manipulate strings
- `Util.Strings.Pool`: make sure you get a unique string

`XReq` package
-----------------

- `XReq.CLI`: Help for command line interface
- `XReq.Features`: Feature file parser and abstract syntax tree
- `XReq.Stanzas`: Stanza type, represents a Given, When, Then line in a
  scenario
- `XReq.Steps`: Step definition interface
- `XReq.Steps.Ada`: Step definition and datatypes for the Ada language
- `XReq.Job`: Represents a job, something to do. Generally extracted from
  the command line
- `XReq.Result`: The result of a job, when it is executed. It contains all
  the data to output the test file.


Data flow
=========

First, the command line create a job (`XReq.Job.Job_Type`) containing the
filename of the feature to execute. To run the job, it must be associated with
and environment (`XReq.Job.Job_Environment`) that contains the output
directory for the tests and the `step_definitions` directory.

The environment is loaded (`XReq.Job.Load`). This step read the
`step_definitions` directory and all the steps in it. The steps
(`XReq.Steps.Steps_Type`) are stored in the environment.

Then, the job is run (`XReq.Job.Run`) and the feature file is parsed
(`XReq.Features.Feature_Type`) and stored in the job. Then, we match each
stanza of each scenario of the feature to steps taken from the environment.

The result (`XReq.Result.Result_Feature_Type`) is the list of scenarios
procedures and all the steps they need to call to run the scenario. Then, the
generator generates Ada code.