Skip to content
This repository was archived by the owner on Dec 12, 2020. It is now read-only.

Conversation

amis92
Copy link
Collaborator

@amis92 amis92 commented Jun 21, 2018

Validates bugs #29, #32 as "expected"

These are unit tests for DocumentTransform.TransformAsync which, for a given "document" string validate if it generates document equal to "expected" document string.

In the current state they all pass. I think that it might be a better approach to first create a "working as-is" environment, and then add bugfixes separately.


edit after additional commits, this PR now:

@amis92
Copy link
Collaborator Author

amis92 commented Jun 21, 2018

I'll happily fix these bugs, although I'm wondering what behavior exactly would we expect; which of the trivia should we keep, and which should we drop?

IMHO, we should drop all except pragma, define if/else/endif; those should probably stay, at least for usings.

Second thing is, should namespace-nested usings also be dropped (as is), or should we leave them too?

@AArnott
Copy link
Owner

AArnott commented Jun 21, 2018

That all sounds good, with one response:

Second thing is, should namespace-nested usings also be dropped (as is), or should we leave them too?

I don't care too much either way. I would tend toward including them. But as long as the code compiles I don't care too much. :)

@amis92
Copy link
Collaborator Author

amis92 commented Jun 24, 2018

After reconsidering the implications, I'm going to drop all trivia, including if/else directives, regions and pragmas. Because generation is expected to be run for each compilation, and a given compilation has a defined set of defines; and also because if-deactivated code parts are trivia nodes in Roslyn Syntax model.

Copy link
Owner

@AArnott AArnott left a comment

Choose a reason for hiding this comment

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

Thanks!

@AArnott
Copy link
Owner

AArnott commented Jun 24, 2018

Does this actually fix #29 and #32 now (as opposed to writing tests to expect the prior behavior)?

@amis92
Copy link
Collaborator Author

amis92 commented Jun 24, 2018

Yes, yes it does fix those two :) Glad to help.

@AArnott AArnott merged commit d45d9fc into AArnott:master Jun 25, 2018
@amis92 amis92 deleted the feature/document-transform-tests branch June 26, 2018 09:19
@amis92 amis92 mentioned this pull request Jun 26, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Problem with #if #endif in using problem with #endregion

2 participants