Skip to content

Commit

Permalink
test: improve test by checking the toString() of FieldSpec implementa…
Browse files Browse the repository at this point in the history
…tion
  • Loading branch information
danglotb committed Aug 20, 2018
1 parent dfb5bc6 commit 0cbc16d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/test/java/com/squareup/javapoet/FieldSpecTest.java
Expand Up @@ -28,10 +28,12 @@ public class FieldSpecTest {
FieldSpec b = FieldSpec.builder(int.class, "foo").build();
assertThat(a.equals(b)).isTrue();
assertThat(a.hashCode()).isEqualTo(b.hashCode());
assertThat(a.toString()).isEqualTo(b.toString());
a = FieldSpec.builder(int.class, "FOO", Modifier.PUBLIC, Modifier.STATIC).build();
b = FieldSpec.builder(int.class, "FOO", Modifier.PUBLIC, Modifier.STATIC).build();
assertThat(a.equals(b)).isTrue();
assertThat(a.hashCode()).isEqualTo(b.hashCode());
assertThat(a.toString()).isEqualTo(b.toString());
}

@Test public void nullAnnotationsAddition() {
Expand Down

0 comments on commit 0cbc16d

Please sign in to comment.