Skip to content

Increase test coverage: Array.prototype.toString #2717

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

Closed
wants to merge 1 commit into from

Conversation

matedabis
Copy link
Contributor

The coverage is measured by the following script, using --jerry-test-suite --test262 --unittests --jerry-tests:
https://github.com/matedabis/jerryscript/blob/gcov_coverage_tester/tests/gcov-tests/gcovtester.py

Branch coverage:
Before: 5/6
After: 6/6

JerryScript-DCO-1.0-Signed-off-by: Mate Dabis mdabis@inf.u-szeged.hu

@@ -61,3 +61,10 @@ try {
assert (e.message === "foo");
assert (e instanceof ReferenceError);
}

// Checking behavior when undefined is passed to the function
Copy link
Member

Choose a reason for hiding this comment

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

At this point not an undefined passed to the function. The function's this_argument is undefined.

@rerobika rerobika added the test Related to testing label Jan 19, 2019
@matedabis
Copy link
Contributor Author

I updated the patch according to the review.

Copy link
Member

@rerobika rerobika left a comment

Choose a reason for hiding this comment

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

LGTM (informal)

@matedabis
Copy link
Contributor Author

Updated the patch:

  • Added comment for the case containing which part of the ES5.1 it tests.
  • Ran the test code in Gecko, V8, SpiderMonkey engines and got the same result.

@@ -61,3 +61,12 @@ try {
assert (e.message === "foo");
assert (e instanceof ReferenceError);
}

/* ES 5.1 15.4.4.2 1. */
// Checking behavior when the function's this_argument is undefined
Copy link
Member

Choose a reason for hiding this comment

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

If the related part of the standard is present, than use the following format:

/* ES v5.1, 15.4.4.2.1. 
   Checking behavior when the function's this_argument is undefined */

@matedabis
Copy link
Contributor Author

Changed comment style.

Branch coverage:
Before: 5/6
After:  6/6

JerryScript-DCO-1.0-Signed-off-by: Mate Dabis mdabis@inf.u-szeged.hu
@matedabis
Copy link
Contributor Author

Closing PR because of moving to another branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
test Related to testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants