提交 eec4f504 编写于 作者: Z zleoyu

webGL测试用例覆盖

WebGLShaderPrecisionFormat类中的rangeMin、rangeMax
WebGLRenderingContextBase类中的LUMINANCE_ALPHA、SHADER_TYPE、LINK_STATUS、VALIDATE_STATUS、VERTEX_ATTRIB_ARRAY_POINTER、FRAMEBUFFER_ATTACHMENT_OBJECT_NAME、CONTEXT_LOST_WEBGL
WebGL2RenderingContextBase类中的EndTransformFeedback、FRAMEBUFFER_DEFAULT、RG8UI、UNIFORM_IS_ROW_MAJOR、ANY_SAMPLES_PASSED_CONSERVATIVE
Signed-off-by: Nzleoyu <zhangleiyu1@huawei.com>
Change-Id: I3d762046cb3542efcdec5b80036bcb723f0745e4
上级 5210eb8b
...@@ -913,6 +913,22 @@ describe('webgl1Test_webgl15', function() { ...@@ -913,6 +913,22 @@ describe('webgl1Test_webgl15', function() {
done(); done();
}); });
/**
* @tc.number GRAPHIC_FUNCTION_JS_WEBGL_TESTWEBGL_1335
* @tc.name testRangeMin
* @tc.desc Test RangeMin.
*/
it('testRangeMin', 0, async function(done) {
console.info('jsWebGL testRangeMin test start');
gl.getShaderPrecisionFormat(gl.FRAGMENT_SHADER, gl.LOW_INT).rangeMin;
gl.getShaderPrecisionFormat(gl.VERTEX_SHADER, gl.MEDIUM_FLOAT).rangeMax;
gl.getShaderPrecisionFormat(gl.VERTEX_SHADER, gl.MEDIUM_FLOAT).precision;
const errorCode = gl.getError();
console.info("WebGLShaderPrecisionFormat getError: " + errorCode);
expect(errorCode).assertEqual(gl.NO_ERROR);
done();
});
/** /**
* @tc.number GRAPHIC_FUNCTION_JS_WEBGL_TESTWEBGL_1337 * @tc.number GRAPHIC_FUNCTION_JS_WEBGL_TESTWEBGL_1337
* @tc.name testRendingContextBase * @tc.name testRendingContextBase
...@@ -950,6 +966,39 @@ describe('webgl1Test_webgl15', function() { ...@@ -950,6 +966,39 @@ describe('webgl1Test_webgl15', function() {
var x9 = gl2.OBJECT_TYPE; var x9 = gl2.OBJECT_TYPE;
expect(x9).assertEqual(37138); expect(x9).assertEqual(37138);
var x10 = gl2.FRAMEBUFFER_DEFAULT;
expect(x10).assertEqual(33304);
var x11 = gl2.RG8UI;
expect(x11).assertEqual(33336);
var x12 = gl2.UNIFORM_IS_ROW_MAJOR;
expect(x12).assertEqual(35390);
var x13 = gl2.ANY_SAMPLES_PASSED_CONSERVATIVE;
expect(x13).assertEqual(36202);
var y1 = gl.LUMINANCE_ALPHA;
expect(y1).assertEqual(6410);
var y2 = gl.SHADER_TYPE;
expect(y2).assertEqual(35663);
var y3 = gl.LINK_STATUS;
expect(y3).assertEqual(35714);
var y4 = gl.VALIDATE_STATUS;
expect(y4).assertEqual(35715);
var y5 = gl.VERTEX_ATTRIB_ARRAY_POINTER;
expect(y5).assertEqual(34373);
var y6 = gl.FRAMEBUFFER_ATTACHMENT_OBJECT_NAME;
expect(y6).assertEqual(36049);
var y7 = gl.CONTEXT_LOST_WEBGL;
expect(y7).assertEqual(37442);
done(); done();
}); });
}) })
...@@ -514,4 +514,19 @@ describe('webgl1Test_webgl16', function() { ...@@ -514,4 +514,19 @@ describe('webgl1Test_webgl16', function() {
expect(stencilValue).assertEqual(false); expect(stencilValue).assertEqual(false);
done(); done();
}) })
/**
* @tc.number GRAPHIC_FUNCTION_JS_WEBGL_TESTWEBGL_1348
* @tc.name webgl_test_endTransformFeedback
* @tc.desc Test endTransformFeedback.
*/
it('webgl_test_endTransformFeedback', 0, async function(done) {
let transformFeedback = gl2.createTransformFeedback();
gl2.endTransformFeedback();
let errorCode = gl.getError();
console.info("webgltest endTransformFeedback getError: " + errorCode);
expect(errorCode).assertLarger(gl.NO_ERROR);
//deleteContext();
done();
});
}) })
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册