зеркало из https://github.com/mozilla/pjs.git
"for (i in myArray)" produces unintentional side effects if a test modifies Array.prototype or Object.prototype. Use for (i=0; __; i++) instead.
This commit is contained in:
Родитель
25d8b4b4be
Коммит
38c1d1eb9c
|
@ -40,8 +40,8 @@ function reportFailure (msg)
|
|||
var funcName = currentFunc();
|
||||
var prefix = (funcName) ? "[reported from " + funcName + "] ": "";
|
||||
|
||||
for (l in lines)
|
||||
print (FAILED + prefix + lines[l]);
|
||||
for (var i=0; i<lines.length; i++)
|
||||
print (FAILED + prefix + lines[i]);
|
||||
|
||||
}
|
||||
|
||||
|
@ -53,8 +53,8 @@ function printStatus (msg)
|
|||
var lines = msg.split ("\n");
|
||||
var l;
|
||||
|
||||
for (l in lines)
|
||||
print (STATUS + lines[l]);
|
||||
for (var i=0; i<lines.length; i++)
|
||||
print (STATUS + lines[i]);
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -40,8 +40,8 @@ function reportFailure (msg)
|
|||
var funcName = currentFunc();
|
||||
var prefix = (funcName) ? "[reported from " + funcName + "] ": "";
|
||||
|
||||
for (l in lines)
|
||||
print (FAILED + prefix + lines[l]);
|
||||
for (var i=0; i<lines.length; i++)
|
||||
print (FAILED + prefix + lines[i]);
|
||||
|
||||
}
|
||||
|
||||
|
@ -53,8 +53,8 @@ function printStatus (msg)
|
|||
var lines = msg.split ("\n");
|
||||
var l;
|
||||
|
||||
for (l in lines)
|
||||
print (STATUS + lines[l]);
|
||||
for (var i=0; i<lines.length; i++)
|
||||
print (STATUS + lines[i]);
|
||||
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче