1 /*
  2  * CKEditor - The text editor for Internet - http://ckeditor.com
  3  * Copyright (C) 2003-2008 Frederico Caldeira Knabben
  4  *
  5  * == BEGIN LICENSE ==
  6  *
  7  * Licensed under the terms of any of the following licenses at your
  8  * choice:
  9  *
 10  *  - GNU General Public License Version 2 or later (the "GPL")
 11  *    http://www.gnu.org/licenses/gpl.html
 12  *
 13  *  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
 14  *    http://www.gnu.org/licenses/lgpl.html
 15  *
 16  *  - Mozilla Public License Version 1.1 or later (the "MPL")
 17  *    http://www.mozilla.org/MPL/MPL-1.1.html
 18  *
 19  * == END LICENSE ==
 20  */
 21
 22 /**
 23  * @fileOverview Defines the {@link CKEDITOR.test} object, which contains
 24  *		functions used at our testing environment.
 25  */
 26
 27 /*jsl:import ../tests/yuitest.js*/
 28
 29 /**
 30  * Contains functions used at our testing environment. Currently,
 31  * our testing system is based on the
 32  * <a href="http://developer.yahoo.com/yui/yuitest/">YUI Test</a>.
 33  * @namespace
 34  * @example
 35  */
 36 CKEDITOR.test =
 37 {
 38 	/**
 39 	 * The assertion namespace, containing all assertion functions. Currently,
 40 	 * this is an alias for
 41 	 * <a href="http://developer.yahoo.com/yui/docs/YAHOO.util.Assert.html">YAHOO.util.Assert</a>.
 42 	 * @example
 43 	 * <b>CKEDITOR.test.assert</b>.areEqual( '10', 10 );        // "true"
 44 	 * <b>CKEDITOR.test.assert</b>.areSame( '10', 10 );         // "false"
 45 	 * <b>CKEDITOR.test.assert</b>.isUndefined( window.test );  // "true"
 46 	 */
 47 	assert : YAHOO.util.Assert,
 48
 49 	/**
 50 	 * Adds a test case to the test runner.
 51 	 * @param {Object} testCase The test case object. See other tests for
 52 	 *		examples.
 53 	 * @example
 54 	 * <b>CKEDITOR.test.addTestCase</b>((function()
 55 	 * {
 56 	 *     // Local reference to the "assert" object.
 57 	 *     var assert = CKEDITOR.test.assert;
 58 	 *
 59 	 *     return {
 60 	 *         test_example : function()
 61 	 *         {
 62 	 *             assert.areSame( '10', 10 );  // FAIL
 63 	 *         }
 64 	 *      };
 65 	 * })());
 66 	 */
 67 	addTestCase : function( testCase )
 68 	{
 69 		YAHOO.tool.TestRunner.add( new YAHOO.tool.TestCase( testCase ) );
 70 	}
 71 };
 72