Searched refs:YUITest (Results 1 - 25 of 30) sorted by relevance

12

/yui3/src/test/js/
H A DYUITest.js12 var YUITest = {
H A DShouldError.js11 YUITest.ShouldError = function (message){
14 YUITest.AssertionError.call(this, message || "This test should have thrown an error but didn't.");
25 //inherit from YUITest.AssertionError
26 YUITest.ShouldError.prototype = new YUITest.AssertionError();
29 YUITest.ShouldError.prototype.constructor = YUITest.ShouldError;
H A DShouldFail.js7 * @extends YUITest.AssertionError
11 YUITest.ShouldFail = function (message){
14 YUITest.AssertionError.call(this, message || "This test should fail but didn't.");
25 //inherit from YUITest.AssertionError
26 YUITest.ShouldFail.prototype = new YUITest.AssertionError();
29 YUITest.ShouldFail.prototype.constructor = YUITest.ShouldFail;
H A DUnexpectedValue.js14 YUITest.UnexpectedValue = function (message, unexpected){
17 YUITest.AssertionError.call(this, message);
35 //inherit from YUITest.AssertionError
36 YUITest.UnexpectedValue.prototype = new YUITest.AssertionError();
39 YUITest.UnexpectedValue.prototype.constructor = YUITest.UnexpectedValue;
47 YUITest.UnexpectedValue.prototype.getMessage = function(){
H A DYTestWrap.js6 YUITest.Object = Y.Object;
7 YUITest.Array = Y.Array;
8 YUITest.Util = {
H A DUnexpectedError.js9 * @extends YUITest.AssertionError
13 YUITest.UnexpectedError = function (cause){
16 YUITest.AssertionError.call(this, "Unexpected error: " + cause.message);
41 //inherit from YUITest.AssertionError
42 YUITest.UnexpectedError.prototype = new YUITest.AssertionError();
45 YUITest.UnexpectedError.prototype.constructor = YUITest.UnexpectedError;
H A DComparisonFailure.js14 YUITest.ComparisonFailure = function (message, expected, actual){
17 YUITest.AssertionError.call(this, message);
42 //inherit from YUITest.AssertionError
43 YUITest.ComparisonFailure.prototype = new YUITest.AssertionError;
46 YUITest.ComparisonFailure.prototype.constructor = YUITest.ComparisonFailure;
54 YUITest.ComparisonFailure.prototype.getMessage = function(){
H A DTestCase.js9 YUITest.TestCase = function (template) {
30 YUITest.TestCase.prototype = {
33 constructor: YUITest.TestCase,
43 return YUITest.TestRunner.callback.apply(YUITest.TestRunner,arguments);
54 YUITest.TestRunner.resume(segment);
73 throw new YUITest.Wait(segment, actualDelay);
75 throw new YUITest.Wait(function(){
76 YUITest.Assert.fail("Timeout: wait() called but resume() never called.");
86 * Asserts that a given condition is true. If not, then a YUITest
[all...]
H A DAssertionError.js11 YUITest.AssertionError = function (message){
28 YUITest.AssertionError.prototype = {
31 constructor: YUITest.AssertionError,
H A DObjectAssert.js9 YUITest.ObjectAssert = {
22 YUITest.Assert._increment();
24 var expectedKeys = YUITest.Object.keys(expected),
25 actualKeys = YUITest.Object.keys(actual);
29 YUITest.Assert.fail(YUITest.Assert._formatMessage(message, "Object should have " + expectedKeys.length + " keys but has " + actualKeys.length));
36 throw new YUITest.ComparisonFailure(YUITest.Assert._formatMessage(message, "Values should be equal for property " + name), expected[name], actual[name]);
52 YUITest.ObjectAssert.ownsOrInheritsKey(propertyName, object, message);
65 YUITest
[all...]
H A DAssert.js10 YUITest.Assert = {
83 throw new YUITest.AssertionError(YUITest.Assert._formatMessage(message, "Test force-failed."));
92 YUITest.Assert._increment();
109 YUITest.Assert._increment();
111 throw new YUITest.ComparisonFailure(YUITest.Assert._formatMessage(message, "Values should be equal."), expected, actual);
126 YUITest.Assert._increment();
128 throw new YUITest.UnexpectedValue(YUITest
[all...]
H A DTestSuite.js11 YUITest.TestSuite = function (data) {
46 YUITest.TestSuite.prototype = {
49 constructor: YUITest.TestSuite,
53 * @param {Test.TestSuite||YUITest.TestCase} testObject The test suite or test case to add.
58 if (testObject instanceof YUITest.TestSuite || testObject instanceof YUITest.TestCase) {
H A DMock.js9 YUITest.Mock = function(template){
33 YUITest.Assert.fail("Method " + name + "() was called but was not expected to be.");
57 YUITest.Mock.expect = function(mock /*:Object*/, expectation /*:Object*/){
81 if (!(args[i] instanceof YUITest.Mock.Value)){
82 args[i] = YUITest.Mock.Value(YUITest.Assert.areSame, [args[i]], "Argument " + i + " of " + name + "() is incorrect.");
91 YUITest.Assert.areEqual(args.length, arguments.length, "Method " + name + "() passed incorrect number of arguments.");
103 YUITest.TestRunner._handleError(ex);
113 YUITest.Assert.fail("Method " + name + "() should not have been called.");
116 YUITest
[all...]
H A DArrayAssert.js10 YUITest.ArrayAssert = {
74 YUITest.Assert._increment();
77 YUITest.Assert.fail(YUITest.Assert._formatMessage(message, "Value " +
97 YUITest.Assert._increment();
102 YUITest.Assert.fail(YUITest.Assert._formatMessage(message, "Value " +
123 YUITest.Assert._increment();
131 YUITest.Assert.fail(YUITest
[all...]
H A DWait.js12 YUITest.Wait = function (segment, delay) {
H A DCoverageFormat.js7 YUITest.CoverageFormat = {
18 return YUITest.Util.JSON.stringify(coverage);
40 return YUITest.Util.JSON.stringify(coverage);
H A DDateAssert.js11 YUITest.DateAssert = {
22 YUITest.Assert._increment();
42 throw new YUITest.ComparisonFailure(YUITest.Assert._formatMessage(message, msg), expected, actual);
45 throw new TypeError("YUITest.DateAssert.datesAreEqual(): Expected and actual values must be Date objects.");
58 YUITest.Assert._increment();
78 throw new YUITest.ComparisonFailure(YUITest.Assert._formatMessage(message, msg), expected, actual);
81 throw new TypeError("YUITest.DateAssert.timesAreEqual(): Expected and actual values must be Date objects.");
H A DResults.js10 YUITest.Results = function(name){
68 YUITest.Results.prototype.include = function(results){
H A DTestRunner.js9 YUITest.TestRunner = function(){
83 this.results = new YUITest.Results();
86 if (testObject instanceof YUITest.TestSuite){
89 } else if (testObject instanceof YUITest.TestCase){
127 YUITest.EventTarget.call(this);
131 * @type YUITest.TestSuite
136 this.masterSuite = new YUITest.TestSuite("yuitests" + (new Date()).getTime());
216 TestRunner.prototype = YUITest.Util.mix(new YUITest.EventTarget(), {
219 * If true, YUITest wil
[all...]
H A DReporter.js6 * Default is YUITest.TestFormat.XML.
11 YUITest.Reporter = function(url, format) {
25 this.format = format || YUITest.TestFormat.XML;
52 YUITest.Reporter.prototype = {
55 constructor: YUITest.Reporter,
/yui3/src/test/scripts/
H A DYTestWrap.js6 YUITest.Object = Y.Object;
7 YUITest.Array = Y.Array;
8 YUITest.Util = {
/yui3/src/test/
H A DMakefile2 YUITest = $(PWD)/../../../yuitest/javascript/src macro
10 cp $(YUITest)/asserts/* ./js/
13 cp $(YUITest)/core/* ./js/
14 cp $(YUITest)/util/EventTarget.js ./js/
17 cp $(YUITest)/errors/* ./js/
20 cp $(YUITest)/mock/* ./js/
23 cp $(YUITest)/reporting/* ./js/
24 cp $(YUITest)/web/Reporter.js ./js/
/yui3/src/loader/scripts/
H A Dloader_template.js14 YUITest = require("yuitest").YUITest,
15 Assert = YUITest.Assert,
16 ArrayAssert = YUITest.ArrayAssert,
17 suite = new YUITest.TestSuite("YUILoader");
44 suite.add(new YUITest.TestCase(!!TESTCASE!!));
46 YUITest.TestRunner.add(suite);
/yui3/build/test/
H A Dtest-debug.js14 var YUITest = {
22 YUITest.Object = Y.Object;
23 YUITest.Array = Y.Array;
24 YUITest.Util = {
35 YUITest.EventTarget = function(){
48 YUITest.EventTarget.prototype = {
51 constructor: YUITest.EventTarget,
153 YUITest.TestSuite = function (data) {
188 YUITest.TestSuite.prototype = {
191 constructor: YUITest
[all...]
/yui3/src/io/tests/cli/
H A Drun.js3 var YUITest = require('yuitest'),
21 Y.Test.Runner = YUITest.TestRunner;
22 Y.Test.Case = YUITest.TestCase;
23 Y.Test.Suite = YUITest.TestSuite;
24 Y.Assert = YUITest.Assert;
39 Y.Test.Runner.subscribe(YUITest.TestRunner.COMPLETE_EVENT, function() {

Completed in 394 milliseconds

12