]> git.saurik.com Git - apple/dyld.git/blob - unit-tests/test-cases/branch-islands/main.c
dyld-732.8.tar.gz
[apple/dyld.git] / unit-tests / test-cases / branch-islands / main.c
1 #include <stdio.h>
2 #include <stdlib.h> // exit(), EXIT_SUCCESS
3 #include <stdbool.h>
4 #include <string.h>
5
6 #include "test.h" // PASS(), FAIL(), XPASS(), XFAIL()
7
8 // returns false on success
9 extern bool test1();
10
11 const char* str = "hello";
12
13
14 int main()
15 {
16 if ( test1() )
17 FAIL("branch-islands: test1");
18
19 if ( strncmp(str, "he", 2) != 0 )
20 FAIL("branch-islands: strncmp stub");
21
22
23 PASS("branch-islands");
24 return EXIT_SUCCESS;
25 }
26