mirror of
https://github.com/Noratrieb/libuwuc.git
synced 2026-01-15 12:15:05 +01:00
c test program
This commit is contained in:
parent
54e0e7604e
commit
1baf8df4a8
18 changed files with 150 additions and 68 deletions
|
|
@ -6,19 +6,7 @@ use core::ffi::c_char;
|
|||
|
||||
use libuwuc::{println, utils::SharedThinCstr};
|
||||
|
||||
extern crate c;
|
||||
|
||||
#[panic_handler]
|
||||
#[cfg(not(test))]
|
||||
fn handler(arg: &core::panic::PanicInfo) -> ! {
|
||||
let args = format_args!("<no message>");
|
||||
let payload = arg.message().unwrap_or(&args);
|
||||
libuwuc::io::println!("panicked: {payload}");
|
||||
if let Some(loc) = arg.location() {
|
||||
libuwuc::io::println!(" at {}:{}:{}", loc.file(), loc.line(), loc.column());
|
||||
}
|
||||
libuwuc::start::exit(1);
|
||||
}
|
||||
extern crate rawc;
|
||||
|
||||
#[no_mangle]
|
||||
extern "C" fn main(_argc: i32, _argv: *const *const c_char) -> i32 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue