Generate class methods and constructors with runtime smoke tests
This commit is contained in:
parent
56de5bc976
commit
144da7860e
9 changed files with 673 additions and 115 deletions
|
|
@ -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("))
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue