зеркало из https://github.com/mozilla/pjs.git
Adding a new case, and improving readability.
This commit is contained in:
Родитель
36cfebf1a7
Коммит
97e2fc9f14
|
@ -64,6 +64,7 @@ addThis();
|
|||
status = inSection(2);
|
||||
a = 5;
|
||||
b = 0;
|
||||
c = 0;
|
||||
if (a == 5, b == 6) { c = 1; }
|
||||
actual = c;
|
||||
expect = 0;
|
||||
|
@ -72,11 +73,24 @@ addThis();
|
|||
status = inSection(3);
|
||||
a = 5;
|
||||
b = 6;
|
||||
c = 0;
|
||||
if (a == 5, b == 6) { c = 1; }
|
||||
actual = c;
|
||||
expect = 1;
|
||||
addThis();
|
||||
|
||||
/*
|
||||
* Now get tricky and use the = operator inside the if-clause
|
||||
*/
|
||||
status = inSection(4);
|
||||
a = 0;
|
||||
b = 6;
|
||||
c = 0;
|
||||
if (a = 5, b == 6) { c = 1; }
|
||||
actual = c;
|
||||
expect = 1;
|
||||
addThis();
|
||||
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
|
Загрузка…
Ссылка в новой задаче