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