1
0
Fork 0

Generate class methods and constructors with runtime smoke tests

This commit is contained in:
Brendan Szymanski 2026-07-17 15:43:30 -04:00
parent 56de5bc976
commit 144da7860e
9 changed files with 673 additions and 115 deletions

View file

@ -76,7 +76,8 @@ struct FunctionGenerationTests {
#expect(plan.parameters[0].mapping.marshalIn == .stringToC)
let body = render(plan)
#expect(body.contains("application_name.withCString { cString0 in"))
#expect(body.contains("func setApplicationName(applicationName: String)"))
#expect(body.contains("applicationName.withCString { cString0 in"))
#expect(body.contains("g_set_application_name(cString0)"))
}
@ -93,7 +94,7 @@ struct FunctionGenerationTests {
Issue.record("expected bitfield function to plan successfully"); return
}
let body = render(plan)
#expect(body.contains("GLogLevelFlags(rawValue: numericCast(fatal_mask.rawValue))"))
#expect(body.contains("GLogLevelFlags(rawValue: numericCast(fatalMask.rawValue))"))
#expect(body.contains("LogLevelFlags(rawValue: numericCast("))
}