1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
//! Data structures representing a parsed test file.
//!
//! A test file is a `.clif` file which contains test commands and settings for running a
//! file-based test case.
//!
use crateLocation;
use crateIsaSpec;
use crateSourceMap;
use crateTestCommand;
use Function;
use AnyEntity;
/// A parsed test case.
///
/// This is the result of parsing a `.clif` file which contains a number of test commands and ISA
/// specs followed by the functions that should be tested.
/// Additional details about a function parsed from a text string.
/// These are useful for detecting test commands embedded in comments etc.
/// The details to not affect the semantics of the function.
/// A comment in a parsed function.
///
/// The comment belongs to the immediately preceding entity, whether that is a block header, and
/// instruction, or one of the preamble declarations.
///
/// Comments appearing inside the function but before the preamble, as well as comments appearing
/// after the function are tagged as `AnyEntity::Function`.
/// A cranelift feature in a test file preamble.
///
/// This represents the expectation of the test case. Before running any of the
/// functions of the test file, the feature set should be compared with the
/// feature set used to compile Cranelift. If there is any differences, then the
/// test file should be skipped.