mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-26 11:20:03 +00:00
LibJS: Spec-compliant equality comparisons
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.
This commit is contained in:
committed by
Andreas Kling
parent
cc01933840
commit
532d4bc0ab
@@ -1,4 +1,8 @@
|
||||
load("test-common.js");
|
||||
|
||||
switch (1 + 2) {
|
||||
case '3':
|
||||
assertNotReached();
|
||||
case 3:
|
||||
console.log("PASS");
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user