Skip to content

Commit

Permalink
Update codegen tests to source copyright notice from new place.
Browse files Browse the repository at this point in the history
  • Loading branch information
Sichan Yoo committed Jun 28, 2024
1 parent cfe3770 commit f444349
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions smithy-swift-codegen/src/test/kotlin/EnumGeneratorTests.kt
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class EnumGeneratorTests {

val contents = writer.toString()

contents.shouldContain(SwiftWriter.GENERATED_FILE_HEADER)
contents.shouldContain(settings.copyrightNotice)

val expectedGeneratedEnum = """
/// Really long multi-line Documentation for the enum
Expand Down Expand Up @@ -94,7 +94,7 @@ public enum MyEnum: Swift.Equatable, Swift.RawRepresentable, Swift.CaseIterable,

val contents = writer.toString()

contents.shouldContain(SwiftWriter.GENERATED_FILE_HEADER)
contents.shouldContain(settings.copyrightNotice)

val expectedGeneratedEnum = """
/// Really long multi-line Documentation for the enum
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class StructureGeneratorTests {

val contents = writer.toString()

contents.shouldContain(SwiftWriter.GENERATED_FILE_HEADER)
contents.shouldContain(swiftSettings.copyrightNotice)
val expectedGeneratedStructure =
"""
/// This is documentation about the shape.
Expand Down Expand Up @@ -253,7 +253,7 @@ public struct RecursiveShapesInputOutputLists {

val contents = writer.toString()

contents.shouldContain(SwiftWriter.GENERATED_FILE_HEADER)
contents.shouldContain(swiftSettings.copyrightNotice)
val expectedGeneratedStructure = """
public struct MyError: ClientRuntime.ModeledError, ClientRuntime.ServiceError, ClientRuntime.HTTPError, Swift.Error {
Expand Down
4 changes: 2 additions & 2 deletions smithy-swift-codegen/src/test/kotlin/SwiftDelegatorTests.kt
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class SwiftDelegatorTests {
delegator.useShapeWriter(getFooInputShape, { writer -> writer.write("Hello!") })
delegator.flushWriters()
assertEquals(
SwiftWriter.GENERATED_FILE_HEADER + "\n\nHello!\n",
settings.copyrightNotice + "\n\nHello!\n",
manifest.getFileString("Sources/example/models/GetFooInput.swift").get()
)
}
Expand All @@ -62,7 +62,7 @@ class SwiftDelegatorTests {
delegator.useShapeWriter(getFooInputShape, { writer -> writer.write("Goodbye!") })
delegator.flushWriters()
assertEquals(
SwiftWriter.GENERATED_FILE_HEADER + "\n\nHello!\n\nGoodbye!\n",
settings.copyrightNotice + "\n\nHello!\n\nGoodbye!\n",
manifest.getFileString("Sources/example/models/GetFooInput.swift").get()
)
}
Expand Down
6 changes: 3 additions & 3 deletions smithy-swift-codegen/src/test/kotlin/UnionGeneratorTests.kt
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class UnionGeneratorTests {

val contents = writer.toString()

contents.shouldContain(SwiftWriter.GENERATED_FILE_HEADER)
contents.shouldContain(settings.copyrightNotice)

val expectedGeneratedEnum =
"""
Expand Down Expand Up @@ -83,7 +83,7 @@ class UnionGeneratorTests {

val contents = writer.toString()

contents.shouldContain(SwiftWriter.GENERATED_FILE_HEADER)
contents.shouldContain(settings.copyrightNotice)

val expectedGeneratedEnum =
"""
Expand Down Expand Up @@ -123,7 +123,7 @@ class UnionGeneratorTests {

val contents = writer.toString()

contents.shouldContain(SwiftWriter.GENERATED_FILE_HEADER)
contents.shouldContain(settings.copyrightNotice)

val expectedGeneratedEnum =
"""
Expand Down

0 comments on commit f444349

Please sign in to comment.