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 tests for number parsing #241

Closed
wants to merge 2 commits into from
Closed

Conversation

nechaido
Copy link
Member

@nechaido nechaido commented Jun 26, 2017

Based on #237.
Refs: #239.

@nechaido nechaido added the test label Jun 26, 2017
@nechaido nechaido added this to the 1.0.0 milestone Jun 26, 2017
@nechaido nechaido changed the title test: add deserialization tests test: add tests for number parsing Jun 26, 2017
Copy link
Member

@lundibundi lundibundi left a comment

Choose a reason for hiding this comment

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

LGTM


module.exports = [
{
name: 'binary number starting with b',
Copy link
Member

Choose a reason for hiding this comment

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

I'd have named it like "binary number declared using 0b" as it's not really starting with b, but that's left to your discretion and I'm fine either way. (same in other places)


module.exports = [
{
name: 'object with numeric literals',
Copy link
Member

Choose a reason for hiding this comment

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

Maybe numeric keys will be better?

Copy link
Member

Choose a reason for hiding this comment

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

@lundibundi, saying "numeric keys" is incorrect, it should be "numeric literals as keys".
Also, you've left this comment in the wrong PR, this change is from #237.

Copy link
Member

Choose a reason for hiding this comment

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

Yeah, I've missed that.

@nechaido nechaido force-pushed the add-deserialization-tests branch 2 times, most recently from b13c8cf to bb5ac65 Compare June 27, 2017 11:54
{
name: 'binary number starting with 0b',
value: 42,
serialized: '0b101010'
Copy link
Member

Choose a reason for hiding this comment

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

This shouldn't be in a folder named "json5" because JSON5 doesn't allow these binary number literals.

{
name: 'octal number starting with 0o',
value: 42,
serialized: '0o52'
Copy link
Member

Choose a reason for hiding this comment

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

Same goes for these octal number literals.

@nechaido
Copy link
Member Author

nechaido commented Jul 6, 2017

@belochub ping.

@belochub
Copy link
Member

belochub commented Jul 6, 2017

I am waiting for #237 to land and this PR's rebase afterwards.

@aqrln aqrln removed the blocked label Jul 7, 2017
aqrln pushed a commit that referenced this pull request Jul 7, 2017
PR-URL: #241
Reviewed-By: Denys Otrishko <shishugi@gmail.com>
Reviewed-By: Alexey Orlenko <eaglexrlnk@gmail.com>
@aqrln
Copy link
Member

aqrln commented Jul 7, 2017

Commit 1c088f7 (which is the source of the current conflict) is a commit from #237, which has just landed. The second commit cherry-picks cleanly on master. Landed in 5091398.

@aqrln aqrln closed this Jul 7, 2017
@aqrln aqrln deleted the add-deserialization-tests branch July 7, 2017 18:25
belochub pushed a commit that referenced this pull request Jan 22, 2018
PR-URL: #241
Reviewed-By: Denys Otrishko <shishugi@gmail.com>
Reviewed-By: Alexey Orlenko <eaglexrlnk@gmail.com>
belochub pushed a commit that referenced this pull request Jan 22, 2018
PR-URL: #241
Reviewed-By: Denys Otrishko <shishugi@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#241
Reviewed-By: Denys Otrishko <shishugi@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#241
Reviewed-By: Denys Otrishko <shishugi@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#241
Reviewed-By: Denys Otrishko <shishugi@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.

4 participants