Skip to content

Commit 35d7cad

Browse files
committed
Simplify code.
1 parent 0197356 commit 35d7cad

File tree

1 file changed

+6
-10
lines changed

1 file changed

+6
-10
lines changed

com.ibm.wala.cast.python.ml.test/source/com/ibm/wala/cast/python/ml/test/TestTensorflow2Model.java

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3829,7 +3829,6 @@ private void test(
38293829
"Tensor variable for pointer key: " + lpk + " should have types, but was null.",
38303830
types);
38313831

3832-
// check that the type is in the expected set.
38333832
Set<TensorType> expectedTypes =
38343833
expectedTensorParameterValueNumberToTypes.get(lpk.getValueNumber());
38353834
assertNotNull(
@@ -3838,19 +3837,16 @@ private void test(
38383837
+ " should not be null.",
38393838
expectedTypes);
38403839

3840+
// check that the types are the same.
38413841
assertEquals(
3842-
"Expected number of types for value number: "
3842+
"Expected types for value number: "
38433843
+ lpk.getValueNumber()
38443844
+ " should be "
3845-
+ expectedTypes.size()
3845+
+ expectedTypes
38463846
+ ", but was "
3847-
+ types.size(),
3848-
expectedTypes.size(),
3849-
types.size());
3850-
3851-
assertTrue(
3852-
"Expected types: " + expectedTypes + " to contain actual types: " + types,
3853-
expectedTypes.containsAll(types));
3847+
+ types,
3848+
expectedTypes,
3849+
types);
38543850
});
38553851
}
38563852
}

0 commit comments

Comments
 (0)