Remove usage of @Test(expected = ...) in ZerosTest.

PiperOrigin-RevId: 302995001
Change-Id: Ide4358742b784131a3b22a21db399760493ad287
This commit is contained in:
A. Unique TensorFlower 2020-03-25 16:22:51 -07:00 committed by TensorFlower Gardener
parent 6f9889054a
commit 630c5b8820

View File

@ -17,6 +17,7 @@ package org.tensorflow.op.core;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.fail;
import java.util.List;
@ -142,14 +143,15 @@ public class ZerosTest {
}
}
@Test(expected = IllegalArgumentException.class)
@Test
public void cannotCreateStringZeros() {
try (Graph g = new Graph();
Session sess = new Session(g)) {
Scope scope = new Scope(g);
long[] shape = {2, 2};
Zeros.create(scope, Constant.create(scope, shape), String.class);
}
fail();
} catch (IllegalArgumentException expected) {}
}
@Test