-
-
Notifications
You must be signed in to change notification settings - Fork 365
Added FlattenArray generator #473
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
Added FlattenArray generator #473
Conversation
Well, the canonical data often uses |
8b5e508
to
2adf049
Compare
You mean |
Okay so, I tried this...
And I only broke 1 test on 1 exercise. That's nice. The bad thing is, now this test doesn't compile XD I'll investigate. Counsel is very much appreciated, because I'm only now understanding the |
An alternative could be to use var nestedList = new List<object>
{
null,
new List<object>
{
null,
new List<object> { null },
new List<object> { new List<object> { new List<object> { null } } }
},
null
}; |
Now that I look closely at the Was it broken on another commit? |
@felix91gr I wouldn't worry about the two-bucket exercise, it is most likely due to some change in the canonical data. Just make sure you don't add that file to this PR. I'm also perfectly fine with using |
b470def
to
6760366
Compare
Okay, I reverted all the tests I generated in that run, except for the The problem seems to be that the type checker can't figure out a type for the arrays I'm giving it. That's why I suggested that it should probably be a On the other hand... I just tested changing the arrays by hand from: Do you know how I can do this from the generator? @ErikSchierboom |
Hmmm, I don't think there is an easy way to do that at the moment. I think you'll have to manually create the rendered string. |
I should use a template, right? Like for the Minesweeper generator. But I
don’t really understand those yet — the MS one needed to be almost exactly
the same as the one you sent me.
Where can I read about the syntax and capabilities of the templates?
If at all possible, I’d like to have a recursive one so that I can examine
the array thoroughly.
…On Thu, Oct 12, 2017 at 5:43 PM Erik Schierboom ***@***.***> wrote:
Hmmm, I don't think there is an easy way to do that at the moment. I think
you'll have to manually create the rendered string.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#473 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ALNBJ1gf2oMVAa5BfRf5XIZicq4LnH4qks5srnnogaJpZM4P09ER>
.
|
@felix91gr For templating we use dotliquid. However, as you want to do a recursive rendering, I think you should just do some string manipulation. |
6760366
to
a463421
Compare
I think I finally understood how |
Merged. Awesome! |
I have a problem here. The
null
values in the Canonical Data file for this exercise aren't rendered correctly at the moment of generating the test. In fact, they are ommited:gets rendered as:
Is there a way to
UpdateCanonicalData
the nulls into this one?Assuming there isn't, I digged around in the code base and the only thing I could find that might be amiss is the
ValueFormatter
class. That's the one in charge of rendering, but that's as far as I can go today.Pls halp.