google / google/compile-testing

Constructor names are not compared

Open
#87 0 comments 0 reactions 0 assignees View on GitHub
P3 type=enhancement
Dominant language
Java
Stars
722
Forks
129
Avg merge
11m
Merged PRs (30d)
4

Description

``` java
Truth.assertAbout(JavaSourcesSubjectFactory.javaSources())
.that(givenJavaFile)
.processedWith(someProcessor)
.compilesWithoutError()
.and()
.generatesSources(expectedJavaFile);
```

Expected and generated constructor names are not compared.
Obviously it will fail later at generated source compilation if name is wrong, but it would be nice to detect it in generated sources comparison to make tests fail if such error occurs.

Generated:

``` java
public class Generated {
public Generated() {
}
}
```

Expected:

``` java
public class Generated {
public GeneratedWithBadName() {
}
}
```

With the previous examples, comparison does not fail.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.