зеркало из https://github.com/mozilla/pjs.git
JavaScript Tests - do not perform comparisons for skipped test, bug 354541
This commit is contained in:
Родитель
7bc3487186
Коммит
81919bdc51
|
@ -61,8 +61,6 @@ var actualStringPrototypeInvariant;
|
|||
if (typeof Script == 'undefined')
|
||||
{
|
||||
print('Test skipped. Script not defined.');
|
||||
var actualStringInvariant = true;
|
||||
var actualStringPrototypeInvariant = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -75,12 +73,12 @@ else
|
|||
{
|
||||
actual = ex + '';
|
||||
}
|
||||
reportCompare(expect, actual, 'trim() returned');
|
||||
reportCompare(expectStringInvariant, actualStringInvariant,
|
||||
'String invariant');
|
||||
reportCompare(expectStringPrototypeInvariant,
|
||||
actualStringPrototypeInvariant,
|
||||
'String.prototype invariant');
|
||||
|
||||
}
|
||||
|
||||
reportCompare(expect, actual, 'trim() returned');
|
||||
reportCompare(expectStringInvariant, actualStringInvariant,
|
||||
'String invariant');
|
||||
reportCompare(expectStringPrototypeInvariant,
|
||||
actualStringPrototypeInvariant,
|
||||
'String.prototype invariant');
|
||||
|
||||
|
|
|
@ -65,8 +65,6 @@ function test()
|
|||
if (typeof Script == 'undefined')
|
||||
{
|
||||
print('Test skipped. Script is not defined');
|
||||
var actualStringInvariant = true;
|
||||
var actualStringPrototypeInvariant = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -79,13 +77,13 @@ function test()
|
|||
{
|
||||
actual = ex + '';
|
||||
}
|
||||
|
||||
reportCompare(expect, actual, 'trim() returned');
|
||||
reportCompare(expectStringInvariant, actualStringInvariant, 'String invariant');
|
||||
reportCompare(expectStringPrototypeInvariant,
|
||||
actualStringPrototypeInvariant,
|
||||
'String.prototype invariant');
|
||||
}
|
||||
|
||||
reportCompare(expect, actual, 'trim() returned');
|
||||
reportCompare(expectStringInvariant, actualStringInvariant, 'String invariant');
|
||||
reportCompare(expectStringPrototypeInvariant,
|
||||
actualStringPrototypeInvariant,
|
||||
'String.prototype invariant');
|
||||
|
||||
exitFunc ('test');
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче