Skip to content

Commit

Permalink
Merge pull request regl-project#485 from rreusser/report-framebuffer-…
Browse files Browse the repository at this point in the history
…test-failure-without-throwing

Report a safari-specific test failure without halting all tests
  • Loading branch information
rreusser authored May 14, 2018
2 parents 6dcb54d + 6aeb216 commit 29669a4
Showing 1 changed file with 26 additions and 19 deletions.
45 changes: 26 additions & 19 deletions test/framebuffer-parse.js
Original file line number Diff line number Diff line change
Expand Up @@ -519,24 +519,9 @@ tape('framebuffer parsing', function (t) {
}
}

checkProperties(
regl.framebuffer(fboArgs),
{
width: 10,
height: 10,
color: [expected],
depthStencil: {
target: gl.RENDERBUFFER,
format: gl.DEPTH_STENCIL
}
},
'for colorFormat=' + testCase.colorFormat + (testCase.tex ? (' and colorType=' + testCase.colorType) : ''))

// if not renderbuffer, also do the test for cubic fbo.
if (testCase.tex) {
console.log()
checkPropertiesCube(
regl.framebufferCube(fboArgs),
try {
checkProperties(
regl.framebuffer(fboArgs),
{
width: 10,
height: 10,
Expand All @@ -546,7 +531,29 @@ tape('framebuffer parsing', function (t) {
format: gl.DEPTH_STENCIL
}
},
'cubic fbo, for colorFormat=' + testCase.colorFormat + (testCase.tex ? (' and colorType=' + testCase.colorType) : ''))
'for colorFormat=' + testCase.colorFormat + (testCase.tex ? (' and colorType=' + testCase.colorType) : ''))
} catch (e) {
t.notOk(true, e.toString())
}

// if not renderbuffer, also do the test for cubic fbo.
if (testCase.tex) {
try {
checkPropertiesCube(
regl.framebufferCube(fboArgs),
{
width: 10,
height: 10,
color: [expected],
depthStencil: {
target: gl.RENDERBUFFER,
format: gl.DEPTH_STENCIL
}
},
'cubic fbo, for colorFormat=' + testCase.colorFormat + (testCase.tex ? (' and colorType=' + testCase.colorType) : ''))
} catch (e) {
t.notOk(true, e.toString())
}
}
})

Expand Down

0 comments on commit 29669a4

Please sign in to comment.