OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <html><head> |
| 3 <meta charset="utf-8"> |
| 4 <!-- |
| 5 Tests for the OpenGL ES 2.0 HTML Canvas context |
| 6 |
| 7 Copyright (C) 2011 Ilmari Heikkinen <ilmari.heikkinen@gmail.com> |
| 8 |
| 9 Permission is hereby granted, free of charge, to any person |
| 10 obtaining a copy of this software and associated documentation |
| 11 files (the "Software"), to deal in the Software without |
| 12 restriction, including without limitation the rights to use, |
| 13 copy, modify, merge, publish, distribute, sublicense, and/or sell |
| 14 copies of the Software, and to permit persons to whom the |
| 15 Software is furnished to do so, subject to the following |
| 16 conditions: |
| 17 |
| 18 The above copyright notice and this permission notice shall be |
| 19 included in all copies or substantial portions of the Software. |
| 20 |
| 21 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, |
| 22 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES |
| 23 OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND |
| 24 NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT |
| 25 HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, |
| 26 WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
| 27 FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR |
| 28 OTHER DEALINGS IN THE SOFTWARE. |
| 29 |
| 30 |
| 31 --> |
| 32 <link rel="stylesheet" type="text/css" href="../unit.css" /> |
| 33 <script type="application/x-javascript" src="../unit.js"></script> |
| 34 <script type="application/x-javascript" src="../util.js"></script> |
| 35 <script type="application/x-javascript"> |
| 36 |
| 37 /* |
| 38 The following tests are generated from |
| 39 http://www.khronos.org/registry/gles/api/2.0/gl2.h |
| 40 and api_modifications.txt |
| 41 */ |
| 42 Tests.test_activeTexture = function(gl) { |
| 43 assertFail(function(){ gl.activeTexture(); }); |
| 44 } |
| 45 Tests.test_attachShader = function(gl) { |
| 46 assertFail(function(){ gl.attachShader(); }); |
| 47 assertFail(function(){ gl.attachShader(0); }); |
| 48 } |
| 49 Tests.test_bindAttribLocation = function(gl) { |
| 50 assertFail(function(){ gl.bindAttribLocation(); }); |
| 51 assertFail(function(){ gl.bindAttribLocation(0); }); |
| 52 assertFail(function(){ gl.bindAttribLocation(0,0); }); |
| 53 } |
| 54 Tests.test_bindBuffer = function(gl) { |
| 55 assertFail(function(){ gl.bindBuffer(); }); |
| 56 assertFail(function(){ gl.bindBuffer(0); }); |
| 57 } |
| 58 Tests.test_bindFramebuffer = function(gl) { |
| 59 assertFail(function(){ gl.bindFramebuffer(); }); |
| 60 assertFail(function(){ gl.bindFramebuffer(0); }); |
| 61 } |
| 62 Tests.test_bindRenderbuffer = function(gl) { |
| 63 assertFail(function(){ gl.bindRenderbuffer(); }); |
| 64 assertFail(function(){ gl.bindRenderbuffer(0); }); |
| 65 } |
| 66 Tests.test_bindTexture = function(gl) { |
| 67 assertFail(function(){ gl.bindTexture(); }); |
| 68 assertFail(function(){ gl.bindTexture(0); }); |
| 69 } |
| 70 Tests.test_blendColor = function(gl) { |
| 71 assertFail(function(){ gl.blendColor(); }); |
| 72 assertFail(function(){ gl.blendColor(0); }); |
| 73 assertFail(function(){ gl.blendColor(0,0); }); |
| 74 assertFail(function(){ gl.blendColor(0,0,0); }); |
| 75 } |
| 76 Tests.test_blendEquation = function(gl) { |
| 77 assertFail(function(){ gl.blendEquation(); }); |
| 78 } |
| 79 Tests.test_blendEquationSeparate = function(gl) { |
| 80 assertFail(function(){ gl.blendEquationSeparate(); }); |
| 81 assertFail(function(){ gl.blendEquationSeparate(0); }); |
| 82 } |
| 83 Tests.test_blendFunc = function(gl) { |
| 84 assertFail(function(){ gl.blendFunc(); }); |
| 85 assertFail(function(){ gl.blendFunc(0); }); |
| 86 } |
| 87 Tests.test_blendFuncSeparate = function(gl) { |
| 88 assertFail(function(){ gl.blendFuncSeparate(); }); |
| 89 assertFail(function(){ gl.blendFuncSeparate(0); }); |
| 90 assertFail(function(){ gl.blendFuncSeparate(0,0); }); |
| 91 assertFail(function(){ gl.blendFuncSeparate(0,0,0); }); |
| 92 } |
| 93 Tests.test_bufferData = function(gl) { |
| 94 assertFail(function(){ gl.bufferData(); }); |
| 95 assertFail(function(){ gl.bufferData(0); }); |
| 96 assertFail(function(){ gl.bufferData(0,0); }); |
| 97 } |
| 98 Tests.test_bufferSubData = function(gl) { |
| 99 assertFail(function(){ gl.bufferSubData(); }); |
| 100 assertFail(function(){ gl.bufferSubData(0); }); |
| 101 assertFail(function(){ gl.bufferSubData(0,0); }); |
| 102 } |
| 103 Tests.test_checkFramebufferStatus = function(gl) { |
| 104 assertFail(function(){ gl.checkFramebufferStatus(); }); |
| 105 } |
| 106 Tests.test_clear = function(gl) { |
| 107 assertFail(function(){ gl.clear(); }); |
| 108 } |
| 109 Tests.test_clearColor = function(gl) { |
| 110 assertFail(function(){ gl.clearColor(); }); |
| 111 assertFail(function(){ gl.clearColor(0); }); |
| 112 assertFail(function(){ gl.clearColor(0,0); }); |
| 113 assertFail(function(){ gl.clearColor(0,0,0); }); |
| 114 } |
| 115 Tests.test_clearDepth = function(gl) { |
| 116 assertFail(function(){ gl.clearDepth(); }); |
| 117 } |
| 118 Tests.test_clearStencil = function(gl) { |
| 119 assertFail(function(){ gl.clearStencil(); }); |
| 120 } |
| 121 Tests.test_colorMask = function(gl) { |
| 122 assertFail(function(){ gl.colorMask(); }); |
| 123 assertFail(function(){ gl.colorMask(0); }); |
| 124 assertFail(function(){ gl.colorMask(0,0); }); |
| 125 assertFail(function(){ gl.colorMask(0,0,0); }); |
| 126 } |
| 127 Tests.test_compileShader = function(gl) { |
| 128 assertFail(function(){ gl.compileShader(); }); |
| 129 } |
| 130 Tests.test_copyTexImage2D = function(gl) { |
| 131 assertFail(function(){ gl.copyTexImage2D(); }); |
| 132 assertFail(function(){ gl.copyTexImage2D(0); }); |
| 133 assertFail(function(){ gl.copyTexImage2D(0,0); }); |
| 134 assertFail(function(){ gl.copyTexImage2D(0,0,0); }); |
| 135 assertFail(function(){ gl.copyTexImage2D(0,0,0,0); }); |
| 136 assertFail(function(){ gl.copyTexImage2D(0,0,0,0,0); }); |
| 137 assertFail(function(){ gl.copyTexImage2D(0,0,0,0,0,0); }); |
| 138 assertFail(function(){ gl.copyTexImage2D(0,0,0,0,0,0,0); }); |
| 139 } |
| 140 Tests.test_copyTexSubImage2D = function(gl) { |
| 141 assertFail(function(){ gl.copyTexSubImage2D(); }); |
| 142 assertFail(function(){ gl.copyTexSubImage2D(0); }); |
| 143 assertFail(function(){ gl.copyTexSubImage2D(0,0); }); |
| 144 assertFail(function(){ gl.copyTexSubImage2D(0,0,0); }); |
| 145 assertFail(function(){ gl.copyTexSubImage2D(0,0,0,0); }); |
| 146 assertFail(function(){ gl.copyTexSubImage2D(0,0,0,0,0); }); |
| 147 assertFail(function(){ gl.copyTexSubImage2D(0,0,0,0,0,0); }); |
| 148 assertFail(function(){ gl.copyTexSubImage2D(0,0,0,0,0,0,0); }); |
| 149 } |
| 150 Tests.test_createProgram = function(gl) { |
| 151 } |
| 152 Tests.test_createShader = function(gl) { |
| 153 assertFail(function(){ gl.createShader(); }); |
| 154 } |
| 155 Tests.test_cullFace = function(gl) { |
| 156 assertFail(function(){ gl.cullFace(); }); |
| 157 } |
| 158 Tests.test_deleteBuffer = function(gl) { |
| 159 assertFail(function(){ gl.deleteBuffer(); }); |
| 160 } |
| 161 Tests.test_deleteFramebuffer = function(gl) { |
| 162 assertFail(function(){ gl.deleteFramebuffer(); }); |
| 163 } |
| 164 Tests.test_deleteProgram = function(gl) { |
| 165 assertFail(function(){ gl.deleteProgram(); }); |
| 166 } |
| 167 Tests.test_deleteRenderbuffer = function(gl) { |
| 168 assertFail(function(){ gl.deleteRenderbuffer(); }); |
| 169 } |
| 170 Tests.test_deleteShader = function(gl) { |
| 171 assertFail(function(){ gl.deleteShader(); }); |
| 172 } |
| 173 Tests.test_deleteTexture = function(gl) { |
| 174 assertFail(function(){ gl.deleteTexture(); }); |
| 175 } |
| 176 Tests.test_depthFunc = function(gl) { |
| 177 assertFail(function(){ gl.depthFunc(); }); |
| 178 } |
| 179 Tests.test_depthMask = function(gl) { |
| 180 assertFail(function(){ gl.depthMask(); }); |
| 181 } |
| 182 Tests.test_depthRange = function(gl) { |
| 183 assertFail(function(){ gl.depthRange(); }); |
| 184 assertFail(function(){ gl.depthRange(0); }); |
| 185 } |
| 186 Tests.test_detachShader = function(gl) { |
| 187 assertFail(function(){ gl.detachShader(); }); |
| 188 assertFail(function(){ gl.detachShader(0); }); |
| 189 } |
| 190 Tests.test_disable = function(gl) { |
| 191 assertFail(function(){ gl.disable(); }); |
| 192 } |
| 193 Tests.test_disableVertexAttribArray = function(gl) { |
| 194 assertFail(function(){ gl.disableVertexAttribArray(); }); |
| 195 } |
| 196 Tests.test_drawArrays = function(gl) { |
| 197 assertFail(function(){ gl.drawArrays(); }); |
| 198 assertFail(function(){ gl.drawArrays(0); }); |
| 199 assertFail(function(){ gl.drawArrays(0,0); }); |
| 200 } |
| 201 Tests.test_drawElements = function(gl) { |
| 202 assertFail(function(){ gl.drawElements(); }); |
| 203 assertFail(function(){ gl.drawElements(0); }); |
| 204 assertFail(function(){ gl.drawElements(0,0); }); |
| 205 assertFail(function(){ gl.drawElements(0,0,0); }); |
| 206 } |
| 207 Tests.test_enable = function(gl) { |
| 208 assertFail(function(){ gl.enable(); }); |
| 209 } |
| 210 Tests.test_enableVertexAttribArray = function(gl) { |
| 211 assertFail(function(){ gl.enableVertexAttribArray(); }); |
| 212 } |
| 213 Tests.test_finish = function(gl) { |
| 214 } |
| 215 Tests.test_flush = function(gl) { |
| 216 } |
| 217 Tests.test_framebufferRenderbuffer = function(gl) { |
| 218 assertFail(function(){ gl.framebufferRenderbuffer(); }); |
| 219 assertFail(function(){ gl.framebufferRenderbuffer(0); }); |
| 220 assertFail(function(){ gl.framebufferRenderbuffer(0,0); }); |
| 221 assertFail(function(){ gl.framebufferRenderbuffer(0,0,0); }); |
| 222 } |
| 223 Tests.test_framebufferTexture2D = function(gl) { |
| 224 assertFail(function(){ gl.framebufferTexture2D(); }); |
| 225 assertFail(function(){ gl.framebufferTexture2D(0); }); |
| 226 assertFail(function(){ gl.framebufferTexture2D(0,0); }); |
| 227 assertFail(function(){ gl.framebufferTexture2D(0,0,0); }); |
| 228 assertFail(function(){ gl.framebufferTexture2D(0,0,0,0); }); |
| 229 } |
| 230 Tests.test_frontFace = function(gl) { |
| 231 assertFail(function(){ gl.frontFace(); }); |
| 232 } |
| 233 Tests.test_createBuffer = function(gl) { |
| 234 } |
| 235 Tests.test_generateMipmap = function(gl) { |
| 236 assertFail(function(){ gl.generateMipmap(); }); |
| 237 } |
| 238 Tests.test_createFramebuffer = function(gl) { |
| 239 } |
| 240 Tests.test_createRenderbuffer = function(gl) { |
| 241 } |
| 242 Tests.test_createTexture = function(gl) { |
| 243 } |
| 244 Tests.test_getActiveAttrib = function(gl) { |
| 245 assertFail(function(){ gl.getActiveAttrib(); }); |
| 246 assertFail(function(){ gl.getActiveAttrib(0); }); |
| 247 } |
| 248 Tests.test_getActiveUniform = function(gl) { |
| 249 assertFail(function(){ gl.getActiveUniform(); }); |
| 250 assertFail(function(){ gl.getActiveUniform(0); }); |
| 251 } |
| 252 Tests.test_getAttachedShaders = function(gl) { |
| 253 assertFail(function(){ gl.getAttachedShaders(); }); |
| 254 } |
| 255 Tests.test_getAttribLocation = function(gl) { |
| 256 assertFail(function(){ gl.getAttribLocation(); }); |
| 257 assertFail(function(){ gl.getAttribLocation(0); }); |
| 258 } |
| 259 Tests.test_getBufferParameteri = function(gl) { |
| 260 assertFail(function(){ gl.getBufferParameteri(); }); |
| 261 assertFail(function(){ gl.getBufferParameteri(0); }); |
| 262 } |
| 263 Tests.test_getError = function(gl) { |
| 264 } |
| 265 Tests.test_getFramebufferAttachmentParameteri = function(gl) { |
| 266 assertFail(function(){ gl.getFramebufferAttachmentParameteri(); }); |
| 267 assertFail(function(){ gl.getFramebufferAttachmentParameteri(0); }); |
| 268 assertFail(function(){ gl.getFramebufferAttachmentParameteri(0,0); }); |
| 269 } |
| 270 Tests.test_getProgramInfoLog = function(gl) { |
| 271 assertFail(function(){ gl.getProgramInfoLog(); }); |
| 272 } |
| 273 Tests.test_getRenderbufferParameteri = function(gl) { |
| 274 assertFail(function(){ gl.getRenderbufferParameteri(); }); |
| 275 assertFail(function(){ gl.getRenderbufferParameteri(0); }); |
| 276 } |
| 277 Tests.test_getShaderInfoLog = function(gl) { |
| 278 assertFail(function(){ gl.getShaderInfoLog(); }); |
| 279 } |
| 280 Tests.test_getShaderSource = function(gl) { |
| 281 assertFail(function(){ gl.getShaderSource(); }); |
| 282 } |
| 283 Tests.test_getUniformLocation = function(gl) { |
| 284 assertFail(function(){ gl.getUniformLocation(); }); |
| 285 assertFail(function(){ gl.getUniformLocation(0); }); |
| 286 } |
| 287 Tests.test_hint = function(gl) { |
| 288 assertFail(function(){ gl.hint(); }); |
| 289 assertFail(function(){ gl.hint(0); }); |
| 290 } |
| 291 Tests.test_isBuffer = function(gl) { |
| 292 assertFail(function(){ gl.isBuffer(); }); |
| 293 } |
| 294 Tests.test_isEnabled = function(gl) { |
| 295 assertFail(function(){ gl.isEnabled(); }); |
| 296 } |
| 297 Tests.test_isFramebuffer = function(gl) { |
| 298 assertFail(function(){ gl.isFramebuffer(); }); |
| 299 } |
| 300 Tests.test_isProgram = function(gl) { |
| 301 assertFail(function(){ gl.isProgram(); }); |
| 302 } |
| 303 Tests.test_isRenderbuffer = function(gl) { |
| 304 assertFail(function(){ gl.isRenderbuffer(); }); |
| 305 } |
| 306 Tests.test_isShader = function(gl) { |
| 307 assertFail(function(){ gl.isShader(); }); |
| 308 } |
| 309 Tests.test_isTexture = function(gl) { |
| 310 assertFail(function(){ gl.isTexture(); }); |
| 311 } |
| 312 Tests.test_lineWidth = function(gl) { |
| 313 assertFail(function(){ gl.lineWidth(); }); |
| 314 } |
| 315 Tests.test_linkProgram = function(gl) { |
| 316 assertFail(function(){ gl.linkProgram(); }); |
| 317 } |
| 318 Tests.test_polygonOffset = function(gl) { |
| 319 assertFail(function(){ gl.polygonOffset(); }); |
| 320 assertFail(function(){ gl.polygonOffset(0); }); |
| 321 } |
| 322 Tests.test_readPixels = function(gl) { |
| 323 assertFail(function(){ gl.readPixels(); }); |
| 324 assertFail(function(){ gl.readPixels(0); }); |
| 325 assertFail(function(){ gl.readPixels(0,0); }); |
| 326 assertFail(function(){ gl.readPixels(0,0,0); }); |
| 327 assertFail(function(){ gl.readPixels(0,0,0,0); }); |
| 328 assertFail(function(){ gl.readPixels(0,0,0,0,0); }); |
| 329 } |
| 330 Tests.test_renderbufferStorage = function(gl) { |
| 331 assertFail(function(){ gl.renderbufferStorage(); }); |
| 332 assertFail(function(){ gl.renderbufferStorage(0); }); |
| 333 assertFail(function(){ gl.renderbufferStorage(0,0); }); |
| 334 assertFail(function(){ gl.renderbufferStorage(0,0,0); }); |
| 335 } |
| 336 Tests.test_sampleCoverage = function(gl) { |
| 337 assertFail(function(){ gl.sampleCoverage(); }); |
| 338 assertFail(function(){ gl.sampleCoverage(0); }); |
| 339 } |
| 340 Tests.test_scissor = function(gl) { |
| 341 assertFail(function(){ gl.scissor(); }); |
| 342 assertFail(function(){ gl.scissor(0); }); |
| 343 assertFail(function(){ gl.scissor(0,0); }); |
| 344 assertFail(function(){ gl.scissor(0,0,0); }); |
| 345 } |
| 346 Tests.test_shaderSource = function(gl) { |
| 347 assertFail(function(){ gl.shaderSource(); }); |
| 348 assertFail(function(){ gl.shaderSource(0); }); |
| 349 } |
| 350 Tests.test_stencilFunc = function(gl) { |
| 351 assertFail(function(){ gl.stencilFunc(); }); |
| 352 assertFail(function(){ gl.stencilFunc(0); }); |
| 353 assertFail(function(){ gl.stencilFunc(0,0); }); |
| 354 } |
| 355 Tests.test_stencilFuncSeparate = function(gl) { |
| 356 assertFail(function(){ gl.stencilFuncSeparate(); }); |
| 357 assertFail(function(){ gl.stencilFuncSeparate(0); }); |
| 358 assertFail(function(){ gl.stencilFuncSeparate(0,0); }); |
| 359 assertFail(function(){ gl.stencilFuncSeparate(0,0,0); }); |
| 360 } |
| 361 Tests.test_stencilMask = function(gl) { |
| 362 assertFail(function(){ gl.stencilMask(); }); |
| 363 } |
| 364 Tests.test_stencilMaskSeparate = function(gl) { |
| 365 assertFail(function(){ gl.stencilMaskSeparate(); }); |
| 366 assertFail(function(){ gl.stencilMaskSeparate(0); }); |
| 367 } |
| 368 Tests.test_stencilOp = function(gl) { |
| 369 assertFail(function(){ gl.stencilOp(); }); |
| 370 assertFail(function(){ gl.stencilOp(0); }); |
| 371 assertFail(function(){ gl.stencilOp(0,0); }); |
| 372 } |
| 373 Tests.test_stencilOpSeparate = function(gl) { |
| 374 assertFail(function(){ gl.stencilOpSeparate(); }); |
| 375 assertFail(function(){ gl.stencilOpSeparate(0); }); |
| 376 assertFail(function(){ gl.stencilOpSeparate(0,0); }); |
| 377 assertFail(function(){ gl.stencilOpSeparate(0,0,0); }); |
| 378 } |
| 379 Tests.test_texImage2D = function(gl) { |
| 380 assertFail(function(){ gl.texImage2D(); }); |
| 381 assertFail(function(){ gl.texImage2D(0); }); |
| 382 assertFail(function(){ gl.texImage2D(0,0); }); |
| 383 } |
| 384 Tests.test_texParameteri = function(gl) { |
| 385 assertFail(function(){ gl.texParameteri(); }); |
| 386 assertFail(function(){ gl.texParameteri(0); }); |
| 387 assertFail(function(){ gl.texParameteri(0,0); }); |
| 388 } |
| 389 Tests.test_texSubImage2D = function(gl) { |
| 390 assertFail(function(){ gl.texSubImage2D(); }); |
| 391 assertFail(function(){ gl.texSubImage2D(0); }); |
| 392 assertFail(function(){ gl.texSubImage2D(0,0); }); |
| 393 assertFail(function(){ gl.texSubImage2D(0,0,0); }); |
| 394 assertFail(function(){ gl.texSubImage2D(0,0,0,0); }); |
| 395 assertFail(function(){ gl.texSubImage2D(0,0,0,0,0); }); |
| 396 assertFail(function(){ gl.texSubImage2D(0,0,0,0,0,0); }); |
| 397 assertFail(function(){ gl.texSubImage2D(0,0,0,0,0,0,0); }); |
| 398 assertFail(function(){ gl.texSubImage2D(0,0,0,0,0,0,0,0); }); |
| 399 } |
| 400 Tests.test_uniform1f = function(gl) { |
| 401 assertFail(function(){ gl.uniform1f(); }); |
| 402 assertFail(function(){ gl.uniform1f(0); }); |
| 403 } |
| 404 Tests.test_uniform1fv = function(gl) { |
| 405 assertFail(function(){ gl.uniform1fv(); }); |
| 406 assertFail(function(){ gl.uniform1fv(0); }); |
| 407 } |
| 408 Tests.test_uniform1i = function(gl) { |
| 409 assertFail(function(){ gl.uniform1i(); }); |
| 410 assertFail(function(){ gl.uniform1i(0); }); |
| 411 } |
| 412 Tests.test_uniform1iv = function(gl) { |
| 413 assertFail(function(){ gl.uniform1iv(); }); |
| 414 assertFail(function(){ gl.uniform1iv(0); }); |
| 415 } |
| 416 Tests.test_uniform2f = function(gl) { |
| 417 assertFail(function(){ gl.uniform2f(); }); |
| 418 assertFail(function(){ gl.uniform2f(0); }); |
| 419 assertFail(function(){ gl.uniform2f(0,0); }); |
| 420 } |
| 421 Tests.test_uniform2fv = function(gl) { |
| 422 assertFail(function(){ gl.uniform2fv(); }); |
| 423 assertFail(function(){ gl.uniform2fv(0); }); |
| 424 } |
| 425 Tests.test_uniform2i = function(gl) { |
| 426 assertFail(function(){ gl.uniform2i(); }); |
| 427 assertFail(function(){ gl.uniform2i(0); }); |
| 428 assertFail(function(){ gl.uniform2i(0,0); }); |
| 429 } |
| 430 Tests.test_uniform2iv = function(gl) { |
| 431 assertFail(function(){ gl.uniform2iv(); }); |
| 432 assertFail(function(){ gl.uniform2iv(0); }); |
| 433 } |
| 434 Tests.test_uniform3f = function(gl) { |
| 435 assertFail(function(){ gl.uniform3f(); }); |
| 436 assertFail(function(){ gl.uniform3f(0); }); |
| 437 assertFail(function(){ gl.uniform3f(0,0); }); |
| 438 assertFail(function(){ gl.uniform3f(0,0,0); }); |
| 439 } |
| 440 Tests.test_uniform3fv = function(gl) { |
| 441 assertFail(function(){ gl.uniform3fv(); }); |
| 442 assertFail(function(){ gl.uniform3fv(0); }); |
| 443 } |
| 444 Tests.test_uniform3i = function(gl) { |
| 445 assertFail(function(){ gl.uniform3i(); }); |
| 446 assertFail(function(){ gl.uniform3i(0); }); |
| 447 assertFail(function(){ gl.uniform3i(0,0); }); |
| 448 assertFail(function(){ gl.uniform3i(0,0,0); }); |
| 449 } |
| 450 Tests.test_uniform3iv = function(gl) { |
| 451 assertFail(function(){ gl.uniform3iv(); }); |
| 452 assertFail(function(){ gl.uniform3iv(0); }); |
| 453 } |
| 454 Tests.test_uniform4f = function(gl) { |
| 455 assertFail(function(){ gl.uniform4f(); }); |
| 456 assertFail(function(){ gl.uniform4f(0); }); |
| 457 assertFail(function(){ gl.uniform4f(0,0); }); |
| 458 assertFail(function(){ gl.uniform4f(0,0,0); }); |
| 459 assertFail(function(){ gl.uniform4f(0,0,0,0); }); |
| 460 } |
| 461 Tests.test_uniform4fv = function(gl) { |
| 462 assertFail(function(){ gl.uniform4fv(); }); |
| 463 assertFail(function(){ gl.uniform4fv(0); }); |
| 464 } |
| 465 Tests.test_uniform4i = function(gl) { |
| 466 assertFail(function(){ gl.uniform4i(); }); |
| 467 assertFail(function(){ gl.uniform4i(0); }); |
| 468 assertFail(function(){ gl.uniform4i(0,0); }); |
| 469 assertFail(function(){ gl.uniform4i(0,0,0); }); |
| 470 assertFail(function(){ gl.uniform4i(0,0,0,0); }); |
| 471 } |
| 472 Tests.test_uniform4iv = function(gl) { |
| 473 assertFail(function(){ gl.uniform4iv(); }); |
| 474 assertFail(function(){ gl.uniform4iv(0); }); |
| 475 } |
| 476 Tests.test_uniformMatrix2fv = function(gl) { |
| 477 assertFail(function(){ gl.uniformMatrix2fv(); }); |
| 478 assertFail(function(){ gl.uniformMatrix2fv(0); }); |
| 479 assertFail(function(){ gl.uniformMatrix2fv(0,0); }); |
| 480 } |
| 481 Tests.test_uniformMatrix3fv = function(gl) { |
| 482 assertFail(function(){ gl.uniformMatrix3fv(); }); |
| 483 assertFail(function(){ gl.uniformMatrix3fv(0); }); |
| 484 assertFail(function(){ gl.uniformMatrix3fv(0,0); }); |
| 485 } |
| 486 Tests.test_uniformMatrix4fv = function(gl) { |
| 487 assertFail(function(){ gl.uniformMatrix4fv(); }); |
| 488 assertFail(function(){ gl.uniformMatrix4fv(0); }); |
| 489 assertFail(function(){ gl.uniformMatrix4fv(0,0); }); |
| 490 } |
| 491 Tests.test_useProgram = function(gl) { |
| 492 assertFail(function(){ gl.useProgram(); }); |
| 493 } |
| 494 Tests.test_validateProgram = function(gl) { |
| 495 assertFail(function(){ gl.validateProgram(); }); |
| 496 } |
| 497 Tests.test_vertexAttrib1f = function(gl) { |
| 498 assertFail(function(){ gl.vertexAttrib1f(); }); |
| 499 assertFail(function(){ gl.vertexAttrib1f(0); }); |
| 500 } |
| 501 Tests.test_vertexAttrib1fv = function(gl) { |
| 502 assertFail(function(){ gl.vertexAttrib1fv(); }); |
| 503 assertFail(function(){ gl.vertexAttrib1fv(0); }); |
| 504 } |
| 505 Tests.test_vertexAttrib2f = function(gl) { |
| 506 assertFail(function(){ gl.vertexAttrib2f(); }); |
| 507 assertFail(function(){ gl.vertexAttrib2f(0); }); |
| 508 assertFail(function(){ gl.vertexAttrib2f(0,0); }); |
| 509 } |
| 510 Tests.test_vertexAttrib2fv = function(gl) { |
| 511 assertFail(function(){ gl.vertexAttrib2fv(); }); |
| 512 assertFail(function(){ gl.vertexAttrib2fv(0); }); |
| 513 } |
| 514 Tests.test_vertexAttrib3f = function(gl) { |
| 515 assertFail(function(){ gl.vertexAttrib3f(); }); |
| 516 assertFail(function(){ gl.vertexAttrib3f(0); }); |
| 517 assertFail(function(){ gl.vertexAttrib3f(0,0); }); |
| 518 assertFail(function(){ gl.vertexAttrib3f(0,0,0); }); |
| 519 } |
| 520 Tests.test_vertexAttrib3fv = function(gl) { |
| 521 assertFail(function(){ gl.vertexAttrib3fv(); }); |
| 522 assertFail(function(){ gl.vertexAttrib3fv(0); }); |
| 523 } |
| 524 Tests.test_vertexAttrib4f = function(gl) { |
| 525 assertFail(function(){ gl.vertexAttrib4f(); }); |
| 526 assertFail(function(){ gl.vertexAttrib4f(0); }); |
| 527 assertFail(function(){ gl.vertexAttrib4f(0,0); }); |
| 528 assertFail(function(){ gl.vertexAttrib4f(0,0,0); }); |
| 529 assertFail(function(){ gl.vertexAttrib4f(0,0,0,0); }); |
| 530 } |
| 531 Tests.test_vertexAttrib4fv = function(gl) { |
| 532 assertFail(function(){ gl.vertexAttrib4fv(); }); |
| 533 assertFail(function(){ gl.vertexAttrib4fv(0); }); |
| 534 } |
| 535 Tests.test_vertexAttribPointer = function(gl) { |
| 536 assertFail(function(){ gl.vertexAttribPointer(); }); |
| 537 assertFail(function(){ gl.vertexAttribPointer(0); }); |
| 538 assertFail(function(){ gl.vertexAttribPointer(0,0); }); |
| 539 assertFail(function(){ gl.vertexAttribPointer(0,0,0); }); |
| 540 assertFail(function(){ gl.vertexAttribPointer(0,0,0,0); }); |
| 541 assertFail(function(){ gl.vertexAttribPointer(0,0,0,0,0); }); |
| 542 } |
| 543 Tests.test_viewport = function(gl) { |
| 544 assertFail(function(){ gl.viewport(); }); |
| 545 assertFail(function(){ gl.viewport(0); }); |
| 546 assertFail(function(){ gl.viewport(0,0); }); |
| 547 assertFail(function(){ gl.viewport(0,0,0); }); |
| 548 } |
| 549 Tests.test_currentArrayBufferBinding = function(gl) { |
| 550 } |
| 551 Tests.test_currentElementArrayBufferBinding = function(gl) { |
| 552 } |
| 553 Tests.test_currentFramebufferBinding = function(gl) { |
| 554 } |
| 555 Tests.test_currentRenderbufferBinding = function(gl) { |
| 556 } |
| 557 Tests.test_currentTextureBinding2D = function(gl) { |
| 558 } |
| 559 Tests.test_currentTextureBindingCubeMap = function(gl) { |
| 560 } |
| 561 Tests.test_currentProgram = function(gl) { |
| 562 } |
| 563 Tests.test_getParameter = function(gl) { |
| 564 assertFail(function(){ gl.getParameter(); }); |
| 565 } |
| 566 Tests.test_getProgramParameter = function(gl) { |
| 567 assertFail(function(){ gl.getProgramParameter(); }); |
| 568 assertFail(function(){ gl.getProgramParameter(0); }); |
| 569 } |
| 570 Tests.test_getShaderParameter = function(gl) { |
| 571 assertFail(function(){ gl.getShaderParameter(); }); |
| 572 assertFail(function(){ gl.getShaderParameter(0); }); |
| 573 } |
| 574 Tests.test_getTexParameteri = function(gl) { |
| 575 assertFail(function(){ gl.getTexParameteri(); }); |
| 576 assertFail(function(){ gl.getTexParameteri(0); }); |
| 577 } |
| 578 Tests.test_getUniformi = function(gl) { |
| 579 assertFail(function(){ gl.getUniformi(); }); |
| 580 assertFail(function(){ gl.getUniformi(0); }); |
| 581 } |
| 582 Tests.test_getVertexAttribi = function(gl) { |
| 583 assertFail(function(){ gl.getVertexAttribi(); }); |
| 584 assertFail(function(){ gl.getVertexAttribi(0); }); |
| 585 } |
| 586 Tests.test_present = function(gl) { |
| 587 } |
| 588 Tests.startUnit = function() { |
| 589 var canvas = document.getElementById('gl'); |
| 590 var gl = wrapGLContext(canvas.getContext(GL_CONTEXT_ID)); |
| 591 return [gl]; |
| 592 } |
| 593 |
| 594 </script> |
| 595 <style>canvas{ position:absolute; }</style> |
| 596 </head><body> |
| 597 <canvas id="gl" width="1" height="1"></canvas> |
| 598 </body></html> |
OLD | NEW |