Skip to content

Commit

Permalink
avm2: Boolean.valueOf and Boolean.toString default to false
Browse files Browse the repository at this point in the history
Makes tests `e15_6_3_1`, `e15_6_3_1_3`, `e15_6_4`, `e15_6_4__1` and `ecall_1` pass.
  • Loading branch information
sleepycatcoding authored and torokati44 committed Aug 18, 2023
1 parent 96faa8c commit b835cc8
Show file tree
Hide file tree
Showing 6 changed files with 2 additions and 7 deletions.
4 changes: 2 additions & 2 deletions core/src/avm2/globals/boolean.rs
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ fn to_string<'gc>(
};
}

Err("Boolean.prototype.toString has been called on an incompatible object".into())
Ok("false".into())
}

/// Implements `Boolean.valueOf`
Expand All @@ -109,7 +109,7 @@ fn value_of<'gc>(
return Ok(*this);
}

Ok(Value::Undefined)
Ok(false.into())
}

/// Construct `Boolean`'s class.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
num_ticks = 1
known_failure = true
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
num_ticks = 1
known_failure = true
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
num_ticks = 1
known_failure = true
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
num_ticks = 1
known_failure = true
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
num_ticks = 1
known_failure = true

0 comments on commit b835cc8

Please sign in to comment.