diff options
author | Wyatt Hepler <hepler@google.com> | 2022-05-18 16:34:56 -0700 |
---|---|---|
committer | CQ Bot Account <pigweed-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2022-05-19 00:10:28 +0000 |
commit | 49b04af6661abde0c91f20b840fe39a96e9969dc (patch) | |
tree | f86b7db15b8573b633eab16f8ec65dfc705e3a44 /pw_hdlc | |
parent | 3994a1b268afbb865f4771b96880063f9cab9df3 (diff) | |
download | pigweed-49b04af6661abde0c91f20b840fe39a96e9969dc.tar.gz |
pw_hdlc: Minor Java test cleanups
- Remove unused imports.
- Remove unnecessary throws declarations.
Change-Id: Ifbb21ff71353e0f5319c0148525695d52fd9a452
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/94925
Pigweed-Auto-Submit: Wyatt Hepler <hepler@google.com>
Reviewed-by: Armando Montanez <amontanez@google.com>
Commit-Queue: Auto-Submit <auto-submit@pigweed.google.com.iam.gserviceaccount.com>
Diffstat (limited to 'pw_hdlc')
-rw-r--r-- | pw_hdlc/java/test/dev/pigweed/pw_hdlc/DecoderTest.java | 1 | ||||
-rw-r--r-- | pw_hdlc/java/test/dev/pigweed/pw_hdlc/EncoderTest.java | 7 | ||||
-rw-r--r-- | pw_hdlc/java/test/dev/pigweed/pw_hdlc/FrameTest.java | 1 |
3 files changed, 3 insertions, 6 deletions
diff --git a/pw_hdlc/java/test/dev/pigweed/pw_hdlc/DecoderTest.java b/pw_hdlc/java/test/dev/pigweed/pw_hdlc/DecoderTest.java index a54a9306c..bdd206aa9 100644 --- a/pw_hdlc/java/test/dev/pigweed/pw_hdlc/DecoderTest.java +++ b/pw_hdlc/java/test/dev/pigweed/pw_hdlc/DecoderTest.java @@ -19,7 +19,6 @@ import static com.google.common.truth.Truth.assertThat; import java.nio.ByteBuffer; import java.util.ArrayList; import org.junit.Test; -import org.junit.runner.RunWith; public class DecoderTest { private final ArrayList<Frame> frames = new ArrayList<>(); diff --git a/pw_hdlc/java/test/dev/pigweed/pw_hdlc/EncoderTest.java b/pw_hdlc/java/test/dev/pigweed/pw_hdlc/EncoderTest.java index 903e993c1..4617e6193 100644 --- a/pw_hdlc/java/test/dev/pigweed/pw_hdlc/EncoderTest.java +++ b/pw_hdlc/java/test/dev/pigweed/pw_hdlc/EncoderTest.java @@ -21,7 +21,6 @@ import java.io.ByteArrayOutputStream; import java.io.IOException; import java.nio.ByteBuffer; import org.junit.Test; -import org.junit.runner.RunWith; public class EncoderTest { private static final int OUTPUT_SIZE = 1024; @@ -299,12 +298,12 @@ public class EncoderTest { private static class ExpectedValueBuilder { private final ByteArrayOutputStream outputStream = new ByteArrayOutputStream(OUTPUT_SIZE); - public ExpectedValueBuilder writeFlag() throws IOException { + public ExpectedValueBuilder writeFlag() { outputStream.write(Protocol.FLAG); return this; } - public ExpectedValueBuilder write(byte b) throws IOException { + public ExpectedValueBuilder write(byte b) { outputStream.write(b); return this; } @@ -314,7 +313,7 @@ public class EncoderTest { return this; } - public ExpectedValueBuilder writeCrc(int crc) throws IOException { + public ExpectedValueBuilder writeCrc(int crc) { outputStream.write(0xFF & crc); outputStream.write(0xFF & (crc >> 8)); outputStream.write(0xFF & (crc >> 16)); diff --git a/pw_hdlc/java/test/dev/pigweed/pw_hdlc/FrameTest.java b/pw_hdlc/java/test/dev/pigweed/pw_hdlc/FrameTest.java index bc2b793db..12084263d 100644 --- a/pw_hdlc/java/test/dev/pigweed/pw_hdlc/FrameTest.java +++ b/pw_hdlc/java/test/dev/pigweed/pw_hdlc/FrameTest.java @@ -18,7 +18,6 @@ import static com.google.common.truth.Truth.assertThat; import java.nio.ByteBuffer; import org.junit.Test; -import org.junit.runner.RunWith; public class FrameTest { @Test |