19 lines
767 B
Swift
19 lines
767 B
Swift
import Foundation
|
|
import Testing
|
|
@testable import SprachmittlerEngines
|
|
|
|
@Test func moduleLinks() {
|
|
#expect(SprachmittlerEnginesModule.moduleName == "SprachmittlerEngines")
|
|
}
|
|
|
|
/// T2.2 will replace this with a byte-exact comparison against the adapter's prompt.
|
|
@Test func canonicalDefaultPromptFixtureIsTheDocumentedTemplate() throws {
|
|
let base = try #require(Bundle.module.resourceURL)
|
|
let url = base.appendingPathComponent("Fixtures/default-prompt.txt")
|
|
let prompt = try String(contentsOf: url, encoding: .utf8)
|
|
#expect(prompt.contains("{target_lang}"))
|
|
#expect(prompt.contains("{source_text}"))
|
|
#expect(prompt.contains("**only output the translated result without any additional explanation**"))
|
|
#expect(prompt.contains(":\n\n"))
|
|
}
|