-
-
Notifications
You must be signed in to change notification settings - Fork 231
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
New features: Hexadecimal integers and array initializers #77
Conversation
Codecov Report
@@ Coverage Diff @@
## master #77 +/- ##
==========================================
+ Coverage 81.5% 82.28% +0.78%
==========================================
Files 25 25
Lines 2898 2970 +72
Branches 425 448 +23
==========================================
+ Hits 2362 2444 +82
+ Misses 398 389 -9
+ Partials 138 137 -1
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please see my comments
@@ -638,6 +638,29 @@ public void ExpressionTests_IntegerQualifiers_Exceptions() | |||
} | |||
|
|||
[Fact] | |||
public void ExpressionTests_HexadecimalInteger() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Move this test method to the correct place in the file. (All methods are sorted alphabetically.)
@@ -1028,5 +1051,22 @@ public void ExpressionTests_MethodCall_ReferenceTypeToObjectParameter() | |||
//Assert | |||
Assert.Equal(expectedResult.Count(), result.Count()); | |||
} | |||
|
|||
[Fact] | |||
public void ExpressionTests_ArrayInitializer() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Move this test method to the correct place in the file. (All methods are sorted alphabetically.)
if (c <= '\x007f') | ||
{ | ||
c |= (char)0x20; | ||
return c >= 'a' && c <= 'f'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will this also work for 'A' and 'F' (capital ?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. Binary or with 0x20 makes all letters lowercase.
@@ -290,6 +290,17 @@ public void NextToken() | |||
NextChar(); | |||
} while (char.IsDigit(_ch)); | |||
|
|||
bool hexInteger = false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code coverage from TextParser.cs
dropped a bit, can you please check if you can add some more specific tests in this area?
var list = new[] { 0, 1, 2, 3, 4 }; | ||
|
||
//Act | ||
var result1 = list.AsQueryable().SelectMany("new[] {}"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe add a test to test array in array ?
Like SelectMany("new[] { new[] { it + 1, it + 2 }, new[] { 10, 20 } }");
Array in array test.
Done |
Hexadecimal integers and array initializers