diff --git a/nova_vm/src/ecmascript/builtins/keyed_collections/set_objects/set_constructor.rs b/nova_vm/src/ecmascript/builtins/keyed_collections/set_objects/set_constructor.rs index 0f9e937bc..a9b921a32 100644 --- a/nova_vm/src/ecmascript/builtins/keyed_collections/set_objects/set_constructor.rs +++ b/nova_vm/src/ecmascript/builtins/keyed_collections/set_objects/set_constructor.rs @@ -18,7 +18,9 @@ use crate::{ builders::builtin_function_builder::BuiltinFunctionBuilder, builtins::{ ArgumentsList, Behaviour, Builtin, BuiltinGetter, BuiltinIntrinsicConstructor, - array::ArrayHeap, ordinary::ordinary_create_from_constructor, set::Set, + array::ArrayHeap, + keyed_collections::map_objects::map_prototype::canonicalize_keyed_collection_key, + ordinary::ordinary_create_from_constructor, set::Set, }, execution::{Agent, JsResult, ProtoIntrinsics, Realm, agent::ExceptionType}, types::{ @@ -164,7 +166,7 @@ impl SetConstructor { .values .iter() .for_each(|value| { - let value = value.unwrap(); + let value = canonicalize_keyed_collection_key(numbers, value.unwrap()); let value_hash = hasher(value); let next_index = values.len() as u32; let entry = set_data.entry( diff --git a/tests/expectations.json b/tests/expectations.json index 6d082e422..881183903 100644 --- a/tests/expectations.json +++ b/tests/expectations.json @@ -1460,8 +1460,6 @@ "built-ins/RegExp/unicode_restricted_identity_escape_c.js": "FAIL", "built-ins/RegExpStringIteratorPrototype/next/regexp-tolength-lastindex-throws.js": "FAIL", "built-ins/Set/proto-from-ctor-realm.js": "FAIL", - "built-ins/Set/prototype/add/will-not-add-duplicate-entry-normalizes-zero.js": "FAIL", - "built-ins/Set/prototype/delete/delete-entry-normalizes-zero.js": "FAIL", "built-ins/Set/prototype/difference/add-not-called.js": "FAIL", "built-ins/Set/prototype/difference/allows-set-like-class.js": "FAIL", "built-ins/Set/prototype/difference/allows-set-like-object.js": "FAIL", @@ -1612,7 +1610,6 @@ "built-ins/Set/prototype/union/subclass.js": "FAIL", "built-ins/Set/prototype/union/union.js": "FAIL", "built-ins/Set/set-iterable-calls-add.js": "FAIL", - "built-ins/Set/valid-values.js": "FAIL", "built-ins/ShadowRealm/WrappedFunction/length-throws-typeerror.js": "FAIL", "built-ins/ShadowRealm/WrappedFunction/length.js": "FAIL", "built-ins/ShadowRealm/WrappedFunction/name-throws-typeerror.js": "FAIL", diff --git a/tests/metrics.json b/tests/metrics.json index 4f6eee21b..f5eac025a 100644 --- a/tests/metrics.json +++ b/tests/metrics.json @@ -1,8 +1,8 @@ { "results": { "crash": 70, - "fail": 7450, - "pass": 39832, + "fail": 7447, + "pass": 39835, "skip": 3326, "timeout": 18, "unresolved": 37