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

test: add serialization tests #237

Closed
wants to merge 1 commit into from
Closed

Conversation

nechaido
Copy link
Member

Based on #236.

]
Copy link
Member

Choose a reason for hiding this comment

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

What was changed on this line?

@nechaido nechaido force-pushed the add-serialization-tests branch 2 times, most recently from c8e2622 to c92a465 Compare June 23, 2017 14:05
@nechaido
Copy link
Member Author

nechaido commented Jun 23, 2017

I is easier to review this PR using comparison with #236

@@ -0,0 +1,5 @@
'use strict';
Copy link
Member

Choose a reason for hiding this comment

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

Why is this in test/fixtures/json5?

Copy link
Member Author

@nechaido nechaido Jun 26, 2017

Choose a reason for hiding this comment

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

I placed it here because they are tests for json5 specification, byt i guess I should have placed them in test/fixtures/todo/json5/

@belochub belochub added this to the 1.0.0 milestone Jun 26, 2017
@belochub belochub assigned belochub and unassigned belochub Jun 27, 2017
@nechaido nechaido force-pushed the add-serialization-tests branch from 9fa3821 to 300f718 Compare June 27, 2017 11:41
@nechaido nechaido requested a review from aqrln June 27, 2017 11:42
serialized: '{$:\'dollar\',_$_:\'multiple symbols\'}'
},
{
name: 'object with unicode unquoted key',
Copy link
Member

Choose a reason for hiding this comment

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

"unicode" should be capitalized here.

Copy link
Member

Choose a reason for hiding this comment

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

Also, it is better to name this test case "object with identifier name, containing non-latin Unicode literals, as a key".

serialized: '{42:true}'
},
{
name: 'object with unquoted keys',
Copy link
Member

Choose a reason for hiding this comment

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

And this one should be called "object with identifier names as keys".

Copy link
Member Author

Choose a reason for hiding this comment

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

This name was taken from corresponding test for JSON5 parsing test: test/fixtures/json5/objects/unquoted-keys.json5.

Copy link
Member

Choose a reason for hiding this comment

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

@nechaido, yes, and these JSON5 tests are imported while you are creating new tests, in my opinion, it is better to name them correctly.

Copy link
Member Author

Choose a reason for hiding this comment

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


module.exports = [
{
name: 'string with inline comment like substring',
Copy link
Member

Choose a reason for hiding this comment

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

This name is a bit misleading here.

@belochub belochub removed the blocked label Jun 27, 2017

module.exports = [
{
name: 'string with substring like inline comment',
Copy link
Member

Choose a reason for hiding this comment

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

This should be called "string containing inline comment".

},
{
name: 'object with identifier name' +
', containing non-latin Unicode literals, as a key',
Copy link
Member

Choose a reason for hiding this comment

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

You shouldn't start a new line with a comma.

@nechaido nechaido force-pushed the add-serialization-tests branch from c41a64c to 411ba26 Compare June 27, 2017 14:00
Copy link
Member

@belochub belochub left a comment

Choose a reason for hiding this comment

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

LGTM

@nechaido nechaido force-pushed the add-serialization-tests branch from 411ba26 to 9c6d914 Compare June 27, 2017 16:52
@nechaido nechaido requested a review from belochub June 27, 2017 16:52
@nechaido nechaido force-pushed the add-serialization-tests branch from 9c6d914 to 1c088f7 Compare June 27, 2017 16:59
@nechaido
Copy link
Member Author

nechaido commented Jul 6, 2017

@aqrln ping.

aqrln pushed a commit that referenced this pull request Jul 7, 2017
PR-URL: #237
Reviewed-By: Mykola Bilochub <nbelochub@gmail.com>
Reviewed-By: Alexey Orlenko <eaglexrlnk@gmail.com>
@aqrln
Copy link
Member

aqrln commented Jul 7, 2017

Landed in 3807446.

@aqrln aqrln closed this Jul 7, 2017
@aqrln aqrln deleted the add-serialization-tests branch July 7, 2017 18:17
belochub pushed a commit that referenced this pull request Jan 22, 2018
PR-URL: #237
Reviewed-By: Mykola Bilochub <nbelochub@gmail.com>
Reviewed-By: Alexey Orlenko <eaglexrlnk@gmail.com>
belochub pushed a commit that referenced this pull request Jan 22, 2018
PR-URL: #237
Reviewed-By: Mykola Bilochub <nbelochub@gmail.com>
Reviewed-By: Alexey Orlenko <eaglexrlnk@gmail.com>
@belochub belochub mentioned this pull request Jan 22, 2018
belochub pushed a commit to metarhia/mdsf that referenced this pull request Jul 19, 2018
PR-URL: metarhia/jstp#237
Reviewed-By: Mykola Bilochub <nbelochub@gmail.com>
Reviewed-By: Alexey Orlenko <eaglexrlnk@gmail.com>
belochub pushed a commit to metarhia/mdsf that referenced this pull request Jul 19, 2018
PR-URL: metarhia/jstp#237
Reviewed-By: Mykola Bilochub <nbelochub@gmail.com>
Reviewed-By: Alexey Orlenko <eaglexrlnk@gmail.com>
belochub pushed a commit to metarhia/mdsf that referenced this pull request Jul 21, 2018
PR-URL: metarhia/jstp#237
Reviewed-By: Mykola Bilochub <nbelochub@gmail.com>
Reviewed-By: Alexey Orlenko <eaglexrlnk@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants