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