-
-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add test for all possible error messages
- Loading branch information
1 parent
63ff2b4
commit 3e7a6a9
Showing
11 changed files
with
159 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
extern crate libc; | ||
|
||
pub mod t1; | ||
pub mod t2; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#include <stdlib.h> | ||
#include "t1.h" | ||
|
||
void T1a(void) {} | ||
void* T1b(void) { return NULL; } | ||
void* T1c(void* a) { return NULL; } | ||
int32_t T1d(unsigned a ) { return 0; } | ||
void T1e(unsigned a, const struct T1Bar* b) { } | ||
void T1f(void) {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,24 @@ | ||
#include <stdint.h> | ||
|
||
typedef int32_t Foo; | ||
typedef int32_t T1Foo; | ||
|
||
struct T1Bar { | ||
int32_t a; | ||
uint32_t b; | ||
T1Foo c; | ||
uint8_t d; | ||
}; | ||
|
||
struct T1Baz { | ||
uint64_t a; | ||
struct T1Bar b; | ||
}; | ||
|
||
void T1a(void); | ||
void* T1b(void); | ||
void* T1c(void*); | ||
int32_t T1d(unsigned); | ||
void T1e(unsigned, const struct T1Bar*); | ||
void T1f(void); | ||
|
||
#define T1C 4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,30 @@ | ||
pub type Foo = i32; | ||
use libc::*; | ||
|
||
pub type T1Foo = i32; | ||
|
||
#[repr(C)] | ||
pub struct T1Bar { | ||
pub a: i32, | ||
pub b: u32, | ||
pub c: T1Foo, | ||
pub d: u8, | ||
} | ||
|
||
#[repr(C)] | ||
pub struct T1Baz { | ||
pub a: u64, | ||
pub b: T1Bar, | ||
} | ||
|
||
pub const T1C: u32 = 4; | ||
|
||
extern { | ||
pub fn T1a(); | ||
pub fn T1b() -> *mut c_void; | ||
pub fn T1c(a: *mut c_void) -> *mut c_void; | ||
pub fn T1d(a: c_uint) -> i32; | ||
pub fn T1e(a: c_uint, b: *const T1Bar); | ||
|
||
#[link_name = "T1f"] | ||
pub fn f(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
|
||
void T2a() {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,13 @@ | ||
#include <stdint.h> | ||
|
||
typedef int32_t Foo; | ||
typedef int32_t T2Foo; | ||
typedef int8_t T2Bar; | ||
|
||
struct T2Baz { | ||
int64_t a; | ||
uint32_t b; | ||
}; | ||
|
||
static void T2a(void) {} | ||
|
||
#define T2C 4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,14 @@ | ||
pub type Foo = u32; | ||
pub type T2Foo = u32; | ||
pub type T2Bar = u32; | ||
|
||
#[repr(C)] | ||
pub struct T2Baz { | ||
pub a: u8, | ||
pub b: i32, | ||
} | ||
|
||
pub const T2C: i32 = 5; | ||
|
||
extern { | ||
pub fn T2a(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters