MCPcopy
hub / github.com/unconed/MathBox.js / assert

Function assert

test/Test.js:14–25  ·  view source on GitHub ↗
(bool, message, context)

Source from the content-addressed store, hash-verified

12 var no = '<span style="color: rgb(180, 0, 0);">✘</span> '
13
14 function assert(bool, message, context) {
15 if (bool) stats.pass++;
16 if (!bool) stats.fail++;
17 stats.run++;
18
19 message = '['+ context + '] ' + message;
20
21 console.assert(bool, message);
22 asserts.push((bool ? yes : no) + message);
23
24 report();
25 }
26
27 function report() {
28 document.getElementById('test-output').innerHTML = asserts.join('<br>');

Callers 6

Animator.test.jsFile · 0.85
Materials.test.jsFile · 0.85
didFireFunction · 0.85
testFunction · 0.85
Attributes.test.jsFile · 0.85
runFunction · 0.85

Calls 1

reportFunction · 0.85

Tested by 2

didFireFunction · 0.68
testFunction · 0.68