unit test: more descriptive failure message
This commit is contained in:
parent
c03e831f3c
commit
85ffb48efb
@ -51,6 +51,12 @@ javadoc {
|
||||
}
|
||||
}
|
||||
|
||||
test {
|
||||
testLogging {
|
||||
exceptionFormat = 'full'
|
||||
}
|
||||
}
|
||||
|
||||
task sourcesJar(type: Jar, dependsOn: classes, description: 'Creates a jar from the source files.') {
|
||||
classifier = 'sources'
|
||||
from sourceSets*.allSource
|
||||
|
@ -520,7 +520,7 @@ public class MaterialMatParamOverrideTest {
|
||||
}
|
||||
|
||||
private void outUniforms(Uniform... uniforms) {
|
||||
HashSet<Uniform> actualUniforms = new HashSet<Uniform>();
|
||||
HashSet<Uniform> actualUniforms = new HashSet<>();
|
||||
|
||||
for (Uniform uniform : usedShader.getUniformMap().values()) {
|
||||
if (uniform.getName().startsWith("m_")
|
||||
@ -529,11 +529,10 @@ public class MaterialMatParamOverrideTest {
|
||||
}
|
||||
}
|
||||
|
||||
HashSet<Uniform> expectedUniforms = new HashSet<Uniform>(Arrays.asList(uniforms));
|
||||
HashSet<Uniform> expectedUniforms = new HashSet<>(Arrays.asList(uniforms));
|
||||
|
||||
if (!expectedUniforms.equals(actualUniforms)) {
|
||||
System.out.println(expectedUniforms + " != " + actualUniforms);
|
||||
Assert.fail("Uniform lists must match");
|
||||
Assert.fail("Uniform lists must match: " + expectedUniforms + " != " + actualUniforms);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -35,7 +35,6 @@ import com.jme3.material.MatParamOverride;
|
||||
import com.jme3.math.Matrix4f;
|
||||
import com.jme3.renderer.Camera;
|
||||
import com.jme3.shader.VarType;
|
||||
import static com.jme3.shader.VarType.Texture2D;
|
||||
import com.jme3.texture.Texture2D;
|
||||
import java.lang.reflect.Field;
|
||||
import java.util.HashSet;
|
||||
|
Loading…
x
Reference in New Issue
Block a user