mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 20:31:15 +01:00
Document abbreviation style things (#4996)
We had a long discussion of this, so trying to document what seems to be the conclusion... and also clean up the exceptions that I could find. --------- Co-authored-by: Dana Jansens <danakj@orodu.net>
This commit is contained in:
co-authored by
Dana Jansens
parent
0d2f364f39
commit
467e510d40
@@ -157,11 +157,11 @@ auto TestCompile(llvm::StringRef source) -> bool {
|
||||
return driver.RunCommand({"compile", "--phase=check", "test.carbon"}).success;
|
||||
}
|
||||
|
||||
TEST(SourceGenTest, GenAPIFileDenseDeclsTest) {
|
||||
TEST(SourceGenTest, GenApiFileDenseDeclsTest) {
|
||||
SourceGen gen;
|
||||
|
||||
std::string source =
|
||||
gen.GenAPIFileDenseDecls(1000, SourceGen::DenseDeclParams{});
|
||||
gen.GenApiFileDenseDecls(1000, SourceGen::DenseDeclParams{});
|
||||
// Should be within 1% of the requested line count.
|
||||
EXPECT_THAT(source, Contains('\n').Times(AllOf(Ge(950), Le(1050))));
|
||||
|
||||
@@ -169,13 +169,13 @@ TEST(SourceGenTest, GenAPIFileDenseDeclsTest) {
|
||||
EXPECT_TRUE(TestCompile(source));
|
||||
}
|
||||
|
||||
TEST(SourceGenTest, GenAPIFileDenseDeclsCppTest) {
|
||||
TEST(SourceGenTest, GenApiFileDenseDeclsCppTest) {
|
||||
SourceGen gen(SourceGen::Language::Cpp);
|
||||
|
||||
// Generate a 1000-line file which is enough to have a reasonably accurate
|
||||
// line count estimate and have a few classes.
|
||||
std::string source =
|
||||
gen.GenAPIFileDenseDecls(1000, SourceGen::DenseDeclParams{});
|
||||
gen.GenApiFileDenseDecls(1000, SourceGen::DenseDeclParams{});
|
||||
// Should be within 10% of the requested line count.
|
||||
EXPECT_THAT(source, Contains('\n').Times(AllOf(Ge(900), Le(1100))));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user