File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed
src/test/run-pass-fulldeps Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change 1010
1111// ignore-cross-compile
1212
13+
14+ // The general idea of this test is to enumerate all "interesting" expressions and check that
15+ // `parse(print(e)) == e` for all `e`. Here's what's interesting, for the purposes of this test:
16+ //
17+ // 1. The test focuses on expression nesting, because interactions between different expression
18+ // types are harder to test manually than single expression types in isolation.
19+ //
20+ // 2. The test only considers expressions of at most two nontrivial nodes. So it will check `x +
21+ // x` and `x + (x - x)` but not `(x * x) + (x - x)`. The assumption here is that the correct
22+ // handling of an expression might depend on the expression's parent, but doesn't depend on its
23+ // siblings or any more distant ancestors.
24+ //
25+ // 3. The test only checks certain expression kinds. The assumption is that similar expression
26+ // types, such as `if` and `while` or `+` and `-`, will be handled identically in the printer
27+ // and parser. So if all combinations of exprs involving `if` work correctly, then combinations
28+ // using `while`, `if let`, and so on will likely work as well.
29+
30+
1331#![ feature( rustc_private) ]
1432
1533extern crate syntax;
You can’t perform that action at this time.
0 commit comments