mirror of
https://github.com/RGBCube/serenity
synced 2025-10-25 05:02:36 +00:00
The ECMAScript spec defines multiple equality operations which are used
all over the spec; this patch introduces them. Of course, the two
primary equality operations are AbtractEquals ('==') and StrictEquals
('==='), which have been renamed to 'abstract_eq' and 'strict_eq' in
this patch.
In support of the two operations mentioned above, the following have
also been added: SameValue, SameValueZero, and SameValueNonNumeric.
These are important to have, because they are used elsewhere in the spec
aside from the two primary equality comparisons.
14 lines
169 B
JavaScript
14 lines
169 B
JavaScript
load("test-common.js");
|
|
|
|
switch (1 + 2) {
|
|
case '3':
|
|
assertNotReached();
|
|
case 3:
|
|
console.log("PASS");
|
|
break;
|
|
case 5:
|
|
case 1:
|
|
break;
|
|
default:
|
|
break;
|
|
}
|