[Go] Add a test for godirectorin with const char **
This exercises a bug that was found with this fairly complex mapping, it wasn't putting newlines in the proper place. A previous commit added the newlines, this makes sure it doesn't happen again. Signed-off-by: Corey Minyard <cminyard@mvista.com>
This commit is contained in:
parent
546763ffbc
commit
3cc67d42f3
2 changed files with 112 additions and 1 deletions
|
|
@ -34,6 +34,15 @@ func (p *GoMyClass) S3(s *string) {
|
|||
*s = "R3"
|
||||
}
|
||||
|
||||
func (p *GoMyClass) S4(s []string) {
|
||||
if s[0] != "T1" {
|
||||
panic(s)
|
||||
}
|
||||
if s[1] != "T2" {
|
||||
panic(s)
|
||||
}
|
||||
}
|
||||
|
||||
func main() {
|
||||
a := wrap.NewDirectorMyClass(&GoMyClass{})
|
||||
m := map[string]interface{}{
|
||||
|
|
@ -56,6 +65,8 @@ func main() {
|
|||
panic(str)
|
||||
}
|
||||
|
||||
a.CallS4([]string{ "T1", "T2" })
|
||||
|
||||
a = wrap.NewDirectorMyClass(nil)
|
||||
s = a.Adjust(m)
|
||||
if s.Str != `{"first":"second"}` {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue