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

Add tests for writing in sections. #617

Merged
merged 2 commits into from
Nov 3, 2020
Merged

Conversation

kggilmer
Copy link
Contributor

@kggilmer kggilmer commented Oct 29, 2020

The inline test is failing due to (what I believe to be) a bug.

Issue #, if available: N/A

Description of changes:

I have code that requires multiple integrations to all contribute a string to the same line in codegen output. I use CodeWriter.writeInLine() but this produces no change in the codegen output. This PR captures the bug.

I've added another test which passes which exercises CodeWriter.write() in addition to the breaking test.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@mtdowling
Copy link
Member

Thanks! I moved the tests to the smithy-utils package since the issue can be reproduced there. I also fixed the bug.

kggilmer and others added 2 commits October 31, 2020 09:03
We were not writing intercepted sections that did not contain newlines.
@mtdowling mtdowling force-pushed the write-inline-section-bug branch from d72681a to 7512f16 Compare October 31, 2020 16:04
@mtdowling mtdowling merged commit 09f58bd into master Nov 3, 2020
@mtdowling mtdowling deleted the write-inline-section-bug branch December 11, 2020 17:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Calling CodeWriter.writeInline() produces no output within an onSection() block
2 participants