| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // This file contains various hacks needed to inform JSCompiler of various | 5 // This file contains various hacks needed to inform JSCompiler of various |
| 6 // QUnit-specific properties and methods. It is used only with JSCompiler to | 6 // QUnit-specific properties and methods. It is used only with JSCompiler to |
| 7 // verify the type-correctness of our code. | 7 // verify the type-correctness of our code. |
| 8 | 8 |
| 9 | 9 |
| 10 /** @type {Object} */ | 10 /** @type {Object} */ |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 * @param {boolean} cond | 65 * @param {boolean} cond |
| 66 * @param {string=} desc | 66 * @param {string=} desc |
| 67 * @return {boolean} | 67 * @return {boolean} |
| 68 */ | 68 */ |
| 69 QUnit.ok = function(cond, desc) {}; | 69 QUnit.ok = function(cond, desc) {}; |
| 70 | 70 |
| 71 QUnit.start = function() {}; | 71 QUnit.start = function() {}; |
| 72 | 72 |
| 73 /** | 73 /** |
| 74 * @param {string} desc | 74 * @param {string} desc |
| 75 * @param {Function} f | 75 * @param {function(!QUnit.Assert)} f |
| 76 */ | 76 */ |
| 77 QUnit.test = function(desc, f) {}; | 77 QUnit.test = function(desc, f) {}; |
| 78 | 78 |
| 79 /** @param {Function} f */ | 79 /** @param {Function} f */ |
| 80 QUnit.testStart = function(f) {}; | 80 QUnit.testStart = function(f) {}; |
| 81 | 81 |
| 82 /** | 82 /** |
| 83 * @interface | 83 * @interface |
| 84 * TODO(jrw): Make QUnit implement an interface that extends this |
| 85 * inferface. |
| 84 */ | 86 */ |
| 85 QUnit.Assert = function() {}; | 87 QUnit.Assert = function() {}; |
| 86 | 88 |
| 87 /** | 89 /** |
| 88 * @return {function():void} | 90 * @return {function():void} |
| 89 */ | 91 */ |
| 90 QUnit.Assert.prototype.async = function() {}; | 92 QUnit.Assert.prototype.async = function() {}; |
| 93 |
| 94 // TODO(jrw): Make these the primary definitions. |
| 95 QUnit.Assert.prototype.deepEqual = QUnit.deepEqual; |
| 96 QUnit.Assert.prototype.equal = QUnit.equal; |
| 97 QUnit.Assert.prototype.notEqual = QUnit.notEqual; |
| 98 QUnit.Assert.prototype.ok = QUnit.ok; |
| 99 |
| 100 /** |
| 101 * @const {!QUnit.Assert} |
| 102 */ |
| 103 QUnit.assert; |
| 91 | 104 |
| 92 var deepEqual = QUnit.deepEqual; | 105 var deepEqual = QUnit.deepEqual; |
| 93 var equal = QUnit.equal; | 106 var equal = QUnit.equal; |
| 94 var expect = QUnit.expect; | 107 var expect = QUnit.expect; |
| 95 var module = QUnit.module; | 108 var module = QUnit.module; |
| 96 var notEqual = QUnit.notEqual; | 109 var notEqual = QUnit.notEqual; |
| 97 var ok = QUnit.ok; | 110 var ok = QUnit.ok; |
| 98 var test = QUnit.test; | 111 var test = QUnit.test; |
| OLD | NEW |