Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix output of Object.toString() #737

Merged
merged 3 commits into from
Oct 1, 2020

Conversation

RageKnify
Copy link
Member

@RageKnify RageKnify commented Sep 29, 2020

This Pull Request fixes/closes #729.

It changes the following:

@codecov
Copy link

codecov bot commented Sep 29, 2020

Codecov Report

Merging #737 into master will increase coverage by 0.05%.
The diff coverage is 67.74%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #737      +/-   ##
==========================================
+ Coverage   71.75%   71.80%   +0.05%     
==========================================
  Files         200      200              
  Lines       13983    14012      +29     
==========================================
+ Hits        10033    10062      +29     
  Misses       3950     3950              
Impacted Files Coverage Δ
boa/src/builtins/object/mod.rs 50.49% <50.00%> (-1.32%) ⬇️
boa/src/builtins/object/tests.rs 100.00% <100.00%> (ø)
tester/src/main.rs
tester/src/exec.rs
tester/src/results.rs
tester/src/read.rs
boa_tester/src/results.rs 0.00% <0.00%> (ø)
boa_tester/src/exec.rs 0.00% <0.00%> (ø)
boa_tester/src/main.rs 0.00% <0.00%> (ø)
boa_tester/src/read.rs 0.00% <0.00%> (ø)
... and 2 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7b13c9d...05f076c. Read the comment docs.

@Razican Razican added this to the v0.11.0 milestone Sep 30, 2020
@Razican Razican added bug Something isn't working builtins PRs and Issues related to builtins/intrinsics labels Sep 30, 2020
Copy link
Member

@Razican Razican left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like this approach, but now that we are at it, I think we should implement it to be spec compliant:
https://tc39.es/ecma262/#sec-object.prototype.tostring

@RageKnify
Copy link
Member Author

I like this approach, but now that we are at it, I think we should implement it to be spec compliant:
https://tc39.es/ecma262/#sec-object.prototype.tostring

Yeah, my bad to not look for it.

Test: Add testing of Object.toString(), need update once
Function.prototype.call is implemented

* not fully because Arguments Exotic Objects are not yet implemented
@RageKnify
Copy link
Member Author

I assume one of the bugs in tarpaulin makes it so lines 129 through 136 in boa/src/builtins/object/mod.rs are considered not covered since they are covered by the introduced test.

@RageKnify RageKnify requested a review from Razican October 1, 2020 11:51
Copy link
Member

@Razican Razican left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good from my side! Thanks!

@RageKnify
Copy link
Member Author

Output for [object Error] is currently not tested, I think I'll include it in #749 where I'll introduce the changes to the error constructors discussed in Discord.

@RageKnify RageKnify merged commit cd2ea03 into boa-dev:master Oct 1, 2020
@RageKnify RageKnify deleted the fix/729_obj_toString branch October 1, 2020 17:19
@HalidOdat HalidOdat modified the milestones: v0.11.0, v0.10.0 Oct 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working builtins PRs and Issues related to builtins/intrinsics
Projects
None yet
Development

Successfully merging this pull request may close these issues.

obj.toString() should be "[object Object]" S8.6.2_A3
3 participants