Skip to content

New features: Hexadecimal integers and array initializers#77

Merged
StefH merged 5 commits intozzzprojects:masterfrom
DavidCizek:master
Apr 28, 2017
Merged

New features: Hexadecimal integers and array initializers#77
StefH merged 5 commits intozzzprojects:masterfrom
DavidCizek:master

Conversation

@DavidCizek
Copy link
Contributor

Hexadecimal integers and array initializers

@codecov
Copy link

codecov bot commented Apr 28, 2017

Codecov Report

Merging #77 into master will increase coverage by 0.78%.
The diff coverage is 89.53%.

Impacted file tree graph

@@            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
Impacted Files Coverage Δ
src/System.Linq.Dynamic.Core/ExpressionParser.cs 79.53% <88.33%> (+1.25%) ⬆️
...c/System.Linq.Dynamic.Core/Tokenizer/TextParser.cs 98.61% <92.3%> (+0.51%) ⬆️

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 a891c25...024466e. Read the comment docs.

Copy link
Collaborator

@StefH StefH left a 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

Assert.Throws<ParseException>(() => values.Where("it < -2B"));
}

[Fact]
Copy link
Collaborator

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.)

}

[Fact]
public void ExpressionTests_ArrayInitializer()
Copy link
Collaborator

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';
Copy link
Collaborator

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 ?)

Copy link
Contributor Author

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.

NextChar();
} while (char.IsDigit(_ch));

bool hexInteger = false;
Copy link
Collaborator

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[] {}");
Copy link
Collaborator

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 } }");

@DavidCizek
Copy link
Contributor Author

Done

@StefH StefH changed the title New features New features: Hexadecimal integers and array initializers Apr 28, 2017
@StefH StefH merged commit dc0929a into zzzprojects:master Apr 28, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants