Skip to content

Commit

Permalink
Implement change-array-by-copy methods (boa-dev#3412)
Browse files Browse the repository at this point in the history
* Implement `change-array-by-copy` methods

* Apply review
  • Loading branch information
jedel1043 authored and sam-finch-tezos committed Nov 29, 2023
1 parent 919c8a2 commit 1da23e4
Show file tree
Hide file tree
Showing 8 changed files with 980 additions and 368 deletions.
749 changes: 525 additions & 224 deletions boa_engine/src/builtins/array/mod.rs

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions boa_engine/src/builtins/array/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -874,6 +874,7 @@ fn array_spread_non_iterable() {
fn get_relative_start() {
#[track_caller]
fn assert(context: &mut Context<'_>, arg: Option<&JsValue>, len: u64, expected: u64) {
let arg = arg.unwrap_or(&JsValue::Undefined);
assert_eq!(
Array::get_relative_start(context, arg, len).unwrap(),
expected
Expand All @@ -900,6 +901,7 @@ fn get_relative_start() {
fn get_relative_end() {
#[track_caller]
fn assert(context: &mut Context<'_>, arg: Option<&JsValue>, len: u64, expected: u64) {
let arg = arg.unwrap_or(&JsValue::Undefined);
assert_eq!(
Array::get_relative_end(context, arg, len).unwrap(),
expected
Expand Down
Loading

0 comments on commit 1da23e4

Please sign in to comment.