@@ -66,6 +66,8 @@ directory that helps identify what piece of code is being tested here
66
66
If you've tried and cannot find a more relevant place,
67
67
the test may be added to ` src/test/ui/issues/ ` .
68
68
Still, ** do include the issue number somewhere** .
69
+ But please avoid putting your test there as possible since that
70
+ directory has too many tests and it causes poor semantic organization.
69
71
70
72
When writing a new feature, ** create a subdirectory to store your
71
73
tests** . For example, if you are implementing RFC 1234 ("Widgets"),
@@ -391,6 +393,21 @@ and so forth.
391
393
[ hw-main ] : https://github.com/rust-lang/rust/blob/master/src/test/ui/hello_world/main.rs
392
394
[ hw ] : https://github.com/rust-lang/rust/blob/master/src/test/ui/hello_world/
393
395
396
+ We now have a ton of UI tests and some directories have too many entries.
397
+ This is a problem because it isn't editor/IDE friendly and GitHub UI won't
398
+ show more than 1000 entries. To resolve it and organize semantic structure,
399
+ we have a tidy check to ensure the number of entries is less than 1000.
400
+ However, since ` src/test/ui ` (UI test root directory) and
401
+ ` src/test/ui/issues ` directories have more than 1000 entries,
402
+ we set a different limit for each directories. So, please
403
+ avoid putting a new test there as possible and try to find a more relevant place.
404
+ For example, if your test is related to closure, you should put it to
405
+ ` src/test/ui/closures ` . If you're not sure where is the best place,
406
+ it's still okay to add to ` src/test/ui/issues/ ` . When you reach the limit,
407
+ you could increase it by tweaking [ here] [ ui test tidy ] .
408
+
409
+ [ ui test tidy ] : https://github.com/rust-lang/rust/blob/master/src/tools/tidy/src/ui_tests.rs
410
+
394
411
### Tests that do not result in compile errors
395
412
396
413
By default, a UI test is expected ** not to compile** (in which case,
0 commit comments