-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initial pass of generated C layout tests
- Loading branch information
1 parent
e3250bb
commit 783e317
Showing
3 changed files
with
166 additions
and
8 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
//! This is a stub for the generated layout test. We use bindgen callbacks along | ||
//! with the [`cpp`] crate to compile actual `sizeof` and `alignof` calls in C, | ||
//! as opposed to bindgen's generated layout tests which use hardcoded size literals. | ||
//! | ||
//! This should help ensure that the generated bindings are correct for the actual | ||
//! ABI used by libctru and the devkitARM toolchain, instead of just what libclang | ||
//! thinks they should be at bindgen time. | ||
|
||
#![allow(non_snake_case)] | ||
#![feature(custom_test_frameworks)] | ||
#![test_runner(test_runner::run_gdb)] | ||
|
||
extern crate shim_3ds; | ||
|
||
// TODO: might want to move this into a test crate so we can avoid compiling it | ||
// for non-test builds? Idk if there's a reasonable way to do it though. | ||
|
||
include!(concat!(env!("OUT_DIR"), "/layout_test.rs")); |