Bug 760576 - Define do_check_null test helper for xpcshell tests; r=ted

--HG--
extra : rebase_source : 533f5e85bf6d1f9f074fee227b60dde08a7baf17
This commit is contained in:
Gregory Szorc 2012-06-01 19:23:31 +02:00
parent b072e01d8f
commit b3dde36872
4 changed files with 27 additions and 2 deletions

View File

@ -0,0 +1,6 @@
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/ */
function run_test() {
do_check_null(null);
}

View File

@ -0,0 +1,6 @@
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/ */
function run_test() {
do_check_null(0);
}

View File

@ -3,8 +3,8 @@
; file, You can obtain one at http://mozilla.org/MPL/2.0/.
[DEFAULT]
head =
tail =
head =
tail =
[test_execute_soon.js]
[test_get_file.js]
@ -21,3 +21,8 @@ fail-if = true
[test_skip.js]
skip-if = true
[test_do_check_null.js]
[test_do_check_null_failing.js]
fail-if = true

View File

@ -590,6 +590,14 @@ function todo_check_false(condition, stack) {
todo_check_eq(condition, false, stack);
}
function do_check_null(condition, stack=Components.stack.caller) {
do_check_eq(condition, null, stack);
}
function todo_check_null(condition, stack=Components.stack.caller) {
todo_check_eq(condition, null, stack);
}
function do_test_pending() {
++_tests_pending;