1 // Copyright 2015 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.
11 // Tests libgo.so to export the following functions.
12 // int8_t DidInitRun();
13 // int8_t DidMainRun();
15 // uint32_t Divu(uint32_t, uint32_t);
17 int8_t ran_init
= DidInitRun();
19 fprintf(stderr
, "ERROR: DidInitRun returned unexpected results: %d\n",
23 int8_t ran_main
= DidMainRun();
25 fprintf(stderr
, "ERROR: DidMainRun returned unexpected results: %d\n",
29 int32_t from_pkg
= FromPkg();
30 if (from_pkg
!= 1024) {
31 fprintf(stderr
, "ERROR: FromPkg=%d, want %d\n", from_pkg
, 1024);
34 uint32_t divu
= Divu(2264, 31);
36 fprintf(stderr
, "ERROR: Divu(2264, 31)=%d, want %d\n", divu
, 73);
39 // test.bash looks for "PASS" to ensure this program has reached the end.