From 598eee1cf5979b61171f623da7e3164244ca3792 Mon Sep 17 00:00:00 2001 From: Jan Lehnardt Date: Sun, 22 Feb 2009 13:50:38 +0000 Subject: Add runtime statistics -- without EUnit tests for now. git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@746691 13f79535-47bb-0310-9956-ffa450edef68 --- share/www/script/couch_test_runner.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'share/www/script/couch_test_runner.js') diff --git a/share/www/script/couch_test_runner.js b/share/www/script/couch_test_runner.js index ae357aeb..ae0dc573 100644 --- a/share/www/script/couch_test_runner.js +++ b/share/www/script/couch_test_runner.js @@ -152,13 +152,13 @@ function updateTestsFooter() { // display the line that failed. // Example: // T(MyValue==1); -function T(arg1, arg2) { +function T(arg1, arg2, testName) { if (!arg1) { if (currentRow) { if ($("td.details ol", currentRow).length == 0) { $("
    ").appendTo($("td.details", currentRow)); } - $("
  1. Assertion failed:
  2. ") + $("
  3. Assertion " + (testName ? "'" + testName + "'" : "") + " failed:
  4. ") .find("code").text((arg2 != null ? arg2 : arg1).toString()).end() .appendTo($("td.details ol", currentRow)); } @@ -166,6 +166,10 @@ function T(arg1, arg2) { } } +function TEquals(expected, actual, testName) { + T(equals(expected, actual), "expected '" + expected + "', got '" + actual + "'", testName); +} + function equals(a,b) { if (a === b) return true; try { -- cgit v1.2.3