]> git.saurik.com Git - apple/dyld.git/blame - unit-tests/test-cases/re-export-symbol/main1.c
dyld-851.27.tar.gz
[apple/dyld.git] / unit-tests / test-cases / re-export-symbol / main1.c
CommitLineData
412ebb8e
A
1#include <stdio.h> // fprintf(), NULL
2#include <stdlib.h> // exit(), EXIT_SUCCESS
3#include <dlfcn.h>
4
5#include "test.h" // PASS(), FAIL(), XPASS(), XFAIL()
6
7extern int foo();
8extern int bar();
9
10int (*pbar)() = &bar;
11
12
13int main()
14{
15 if ( foo() != 10 )
16 FAIL("re-export-symbol: foo() returned wrong value");
17 if ( bar() != 10 )
18 FAIL("re-export-symbol: bar() returned wrong value");
19 if ( (*pbar)() != 10 )
20 FAIL("re-export-symbol: (*pbar)() returned wrong value");
21 PASS("re-export-symbol");
22 return 0;
23}