Fix internal lint errors
This commit is contained in:
parent
bf05237063
commit
4678439926
tensorflow/java/src/test/java/org/tensorflow
@ -21,6 +21,9 @@ import org.junit.Test;
|
|||||||
import org.junit.runner.RunWith;
|
import org.junit.runner.RunWith;
|
||||||
import org.junit.runners.JUnit4;
|
import org.junit.runners.JUnit4;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Unit tests for {@link EagerOperationBuilder} class.
|
||||||
|
*/
|
||||||
@RunWith(JUnit4.class)
|
@RunWith(JUnit4.class)
|
||||||
public class EagerOperationBuilderTest {
|
public class EagerOperationBuilderTest {
|
||||||
|
|
||||||
@ -32,6 +35,7 @@ public class EagerOperationBuilderTest {
|
|||||||
new EagerOperationBuilder(session, "Add", "add");
|
new EagerOperationBuilder(session, "Add", "add");
|
||||||
fail();
|
fail();
|
||||||
} catch (IllegalStateException e) {
|
} catch (IllegalStateException e) {
|
||||||
|
// expected
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -45,6 +49,7 @@ public class EagerOperationBuilderTest {
|
|||||||
opBuilder.setAttr("dtype", DataType.FLOAT);
|
opBuilder.setAttr("dtype", DataType.FLOAT);
|
||||||
fail();
|
fail();
|
||||||
} catch (IllegalStateException e) {
|
} catch (IllegalStateException e) {
|
||||||
|
// expected
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -58,7 +63,9 @@ public class EagerOperationBuilderTest {
|
|||||||
try {
|
try {
|
||||||
opBuilder(session, "Const", "var").addControlInput(asrt);
|
opBuilder(session, "Const", "var").addControlInput(asrt);
|
||||||
fail();
|
fail();
|
||||||
} catch (UnsupportedOperationException e) {}
|
} catch (UnsupportedOperationException e) {
|
||||||
|
// expected
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -22,6 +22,9 @@ import org.junit.Test;
|
|||||||
import org.junit.runner.RunWith;
|
import org.junit.runner.RunWith;
|
||||||
import org.junit.runners.JUnit4;
|
import org.junit.runners.JUnit4;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Unit tests for {@link EagerOperation} class.
|
||||||
|
*/
|
||||||
@RunWith(JUnit4.class)
|
@RunWith(JUnit4.class)
|
||||||
public class EagerOperationTest {
|
public class EagerOperationTest {
|
||||||
|
|
||||||
@ -32,7 +35,9 @@ public class EagerOperationTest {
|
|||||||
try {
|
try {
|
||||||
new EagerOperation(session, 1L, new long[] {1L}, "Add", "add");
|
new EagerOperation(session, 1L, new long[] {1L}, "Add", "add");
|
||||||
fail();
|
fail();
|
||||||
} catch (IllegalStateException e) {}
|
} catch (IllegalStateException e) {
|
||||||
|
// expected
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@ -72,12 +77,16 @@ public class EagerOperationTest {
|
|||||||
try {
|
try {
|
||||||
split.inputListLength("no_such_input");
|
split.inputListLength("no_such_input");
|
||||||
fail();
|
fail();
|
||||||
} catch (IllegalArgumentException e) {}
|
} catch (IllegalArgumentException e) {
|
||||||
|
// expected
|
||||||
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
split.outputListLength("no_such_output");
|
split.outputListLength("no_such_output");
|
||||||
fail();
|
fail();
|
||||||
} catch (IllegalArgumentException e) {}
|
} catch (IllegalArgumentException e) {
|
||||||
|
// expected
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -105,7 +114,9 @@ public class EagerOperationTest {
|
|||||||
try {
|
try {
|
||||||
add.outputListLength("z");
|
add.outputListLength("z");
|
||||||
fail();
|
fail();
|
||||||
} catch (IllegalStateException e) {}
|
} catch (IllegalStateException e) {
|
||||||
|
// expected
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static EagerOperationBuilder opBuilder(EagerSession session, String type, String name) {
|
private static EagerOperationBuilder opBuilder(EagerSession session, String type, String name) {
|
||||||
|
Loading…
Reference in New Issue
Block a user