aboutsummaryrefslogtreecommitdiffhomepage
path: root/java
diff options
context:
space:
mode:
Diffstat (limited to 'java')
-rw-r--r--java/core/pom.xml5
-rw-r--r--java/core/src/test/java/com/google/protobuf/TextFormatTest.java28
-rw-r--r--java/pom.xml8
3 files changed, 14 insertions, 27 deletions
diff --git a/java/core/pom.xml b/java/core/pom.xml
index 24bc58c7..bd035adf 100644
--- a/java/core/pom.xml
+++ b/java/core/pom.xml
@@ -34,11 +34,6 @@
<artifactId>easymockclassextension</artifactId>
<scope>test</scope>
</dependency>
- <dependency>
- <groupId>com.google.truth</groupId>
- <artifactId>truth</artifactId>
- <scope>test</scope>
- </dependency>
</dependencies>
<build>
diff --git a/java/core/src/test/java/com/google/protobuf/TextFormatTest.java b/java/core/src/test/java/com/google/protobuf/TextFormatTest.java
index 249d7c5e..910f360f 100644
--- a/java/core/src/test/java/com/google/protobuf/TextFormatTest.java
+++ b/java/core/src/test/java/com/google/protobuf/TextFormatTest.java
@@ -30,8 +30,6 @@
package com.google.protobuf;
-import static com.google.common.truth.Truth.assertThat;
-
import com.google.protobuf.Descriptors.Descriptor;
import com.google.protobuf.Descriptors.FieldDescriptor;
import com.google.protobuf.TextFormat.Parser.SingularOverwritePolicy;
@@ -1079,12 +1077,12 @@ public class TextFormatTest extends TestCase {
{
TestMap.Builder dest = TestMap.newBuilder();
TextFormat.merge(text, dest);
- assertThat(dest.build()).isEqualTo(message);
+ assertEquals(message, dest.build());
}
{
TestMap.Builder dest = TestMap.newBuilder();
parserWithOverwriteForbidden.merge(text, dest);
- assertThat(dest.build()).isEqualTo(message);
+ assertEquals(message, dest.build());
}
}
@@ -1096,10 +1094,10 @@ public class TextFormatTest extends TestCase {
TestMap.Builder dest = TestMap.newBuilder();
parserWithOverwriteForbidden.merge(text, dest);
TestMap message = dest.build();
- assertThat(message.getStringToInt32Field().size()).isEqualTo(2);
- assertThat(message.getInt32ToMessageField().size()).isEqualTo(2);
- assertThat(message.getStringToInt32Field().get("x")).isEqualTo(10);
- assertThat(message.getInt32ToMessageField().get(2).getValue()).isEqualTo(200);
+ assertEquals(2, message.getStringToInt32Field().size());
+ assertEquals(2, message.getInt32ToMessageField().size());
+ assertEquals(10, message.getStringToInt32Field().get("x").intValue());
+ assertEquals(200, message.getInt32ToMessageField().get(2).getValue());
}
public void testMapShortFormEmpty() throws Exception {
@@ -1108,8 +1106,8 @@ public class TextFormatTest extends TestCase {
TestMap.Builder dest = TestMap.newBuilder();
parserWithOverwriteForbidden.merge(text, dest);
TestMap message = dest.build();
- assertThat(message.getStringToInt32Field().size()).isEqualTo(0);
- assertThat(message.getInt32ToMessageField().size()).isEqualTo(0);
+ assertEquals(0, message.getStringToInt32Field().size());
+ assertEquals(0, message.getInt32ToMessageField().size());
}
public void testMapShortFormTrailingComma() throws Exception {
@@ -1119,7 +1117,7 @@ public class TextFormatTest extends TestCase {
parserWithOverwriteForbidden.merge(text, dest);
fail("Expected parse exception.");
} catch (TextFormat.ParseException e) {
- assertThat(e).hasMessageThat().isEqualTo("1:48: Expected \"{\".");
+ assertEquals("1:48: Expected \"{\".", e.getMessage());
}
}
@@ -1134,8 +1132,8 @@ public class TextFormatTest extends TestCase {
TestMap.Builder builder = TestMap.newBuilder();
defaultParser.merge(text, builder);
TestMap map = builder.build();
- assertThat(map.getInt32ToInt32Field().size()).isEqualTo(2);
- assertThat(map.getInt32ToInt32Field().get(1).intValue()).isEqualTo(30);
+ assertEquals(2, map.getInt32ToInt32Field().size());
+ assertEquals(30, map.getInt32ToInt32Field().get(1).intValue());
}
{
@@ -1144,8 +1142,8 @@ public class TextFormatTest extends TestCase {
TestMap.Builder builder = TestMap.newBuilder();
defaultParser.merge(text, builder);
TestMap map = builder.build();
- assertThat(map.getInt32ToInt32Field().size()).isEqualTo(2);
- assertThat(map.getInt32ToInt32Field().get(1).intValue()).isEqualTo(30);
+ assertEquals(2, map.getInt32ToInt32Field().size());
+ assertEquals(30, map.getInt32ToInt32Field().get(1).intValue());
}
}
diff --git a/java/pom.xml b/java/pom.xml
index 2c2f4413..97338292 100644
--- a/java/pom.xml
+++ b/java/pom.xml
@@ -84,13 +84,7 @@
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
- <version>20.0</version>
- </dependency>
- <dependency>
- <groupId>com.google.truth</groupId>
- <artifactId>truth</artifactId>
- <scope>test</scope>
- <version>0.32</version>
+ <version>19.0</version>
</dependency>
</dependencies>
</dependencyManagement>