From 4678439926b69c8435213f0827e62f3c103012fb Mon Sep 17 00:00:00 2001 From: Karl Lessard Date: Thu, 9 May 2019 22:23:54 -0400 Subject: [PATCH] Fix internal lint errors --- .../tensorflow/EagerOperationBuilderTest.java | 9 ++++++++- .../org/tensorflow/EagerOperationTest.java | 19 +++++++++++++++---- 2 files changed, 23 insertions(+), 5 deletions(-) diff --git a/tensorflow/java/src/test/java/org/tensorflow/EagerOperationBuilderTest.java b/tensorflow/java/src/test/java/org/tensorflow/EagerOperationBuilderTest.java index 696a2098f3e..83b683dde6e 100644 --- a/tensorflow/java/src/test/java/org/tensorflow/EagerOperationBuilderTest.java +++ b/tensorflow/java/src/test/java/org/tensorflow/EagerOperationBuilderTest.java @@ -21,6 +21,9 @@ import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; +/** + * Unit tests for {@link EagerOperationBuilder} class. + */ @RunWith(JUnit4.class) public class EagerOperationBuilderTest { @@ -32,6 +35,7 @@ public class EagerOperationBuilderTest { new EagerOperationBuilder(session, "Add", "add"); fail(); } catch (IllegalStateException e) { + // expected } } @@ -45,6 +49,7 @@ public class EagerOperationBuilderTest { opBuilder.setAttr("dtype", DataType.FLOAT); fail(); } catch (IllegalStateException e) { + // expected } } @@ -58,7 +63,9 @@ public class EagerOperationBuilderTest { try { opBuilder(session, "Const", "var").addControlInput(asrt); fail(); - } catch (UnsupportedOperationException e) {} + } catch (UnsupportedOperationException e) { + // expected + } } } diff --git a/tensorflow/java/src/test/java/org/tensorflow/EagerOperationTest.java b/tensorflow/java/src/test/java/org/tensorflow/EagerOperationTest.java index 5a5f5508487..d0256435f48 100644 --- a/tensorflow/java/src/test/java/org/tensorflow/EagerOperationTest.java +++ b/tensorflow/java/src/test/java/org/tensorflow/EagerOperationTest.java @@ -22,6 +22,9 @@ import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; +/** + * Unit tests for {@link EagerOperation} class. + */ @RunWith(JUnit4.class) public class EagerOperationTest { @@ -32,7 +35,9 @@ public class EagerOperationTest { try { new EagerOperation(session, 1L, new long[] {1L}, "Add", "add"); fail(); - } catch (IllegalStateException e) {} + } catch (IllegalStateException e) { + // expected + } } @Test @@ -72,12 +77,16 @@ public class EagerOperationTest { try { split.inputListLength("no_such_input"); fail(); - } catch (IllegalArgumentException e) {} + } catch (IllegalArgumentException e) { + // expected + } try { split.outputListLength("no_such_output"); fail(); - } catch (IllegalArgumentException e) {} + } catch (IllegalArgumentException e) { + // expected + } } } @@ -105,7 +114,9 @@ public class EagerOperationTest { try { add.outputListLength("z"); fail(); - } catch (IllegalStateException e) {} + } catch (IllegalStateException e) { + // expected + } } private static EagerOperationBuilder opBuilder(EagerSession session, String type, String name) {