issue20910.c 459 B

12345678910111213141516171819
  1. // Copyright 2017 The Go Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style
  3. // license that can be found in the LICENSE file.
  4. #include <assert.h>
  5. #include <stdlib.h>
  6. #include <string.h>
  7. #include "_cgo_export.h"
  8. /* Test calling a Go function with multiple return values. */
  9. void
  10. callMulti(void)
  11. {
  12. struct multi_return result = multi();
  13. assert(strcmp(result.r0, "multi") == 0);
  14. assert(result.r1 == 0);
  15. free(result.r0);
  16. }