Skip to content

Add tests for writing in sections. #617

Merged
mtdowling merged 2 commits intomasterfrom
write-inline-section-bug
Nov 3, 2020
Merged

Add tests for writing in sections. #617
mtdowling merged 2 commits intomasterfrom
write-inline-section-bug

Conversation

@kggilmer
Copy link
Copy Markdown
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
Copy Markdown
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