Skip to content

Commit

Permalink
Update init() calls in tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
Anders429 committed Jun 11, 2023
1 parent e82afef commit cd302f9
Show file tree
Hide file tree
Showing 10 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion tests/debug/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ fn panic_handler(_: &core::panic::PanicInfo) -> ! {

#[no_mangle]
pub fn main() {
mgba_log::init().expect("unable to initialize");
unsafe { mgba_log::init() }.expect("unable to initialize");
log::debug!("Hello, world!");

STATUS_REGISTER.write(3);
Expand Down
2 changes: 1 addition & 1 deletion tests/error/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ fn panic_handler(_: &core::panic::PanicInfo) -> ! {

#[no_mangle]
pub fn main() {
mgba_log::init().expect("unable to initialize");
unsafe { mgba_log::init() }.expect("unable to initialize");
log::error!("Hello, world!");

STATUS_REGISTER.write(3);
Expand Down
2 changes: 1 addition & 1 deletion tests/fatal/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ fn panic_handler(_: &core::panic::PanicInfo) -> ! {

#[no_mangle]
pub fn main() {
mgba_log::init().expect("unable to initialize");
unsafe { mgba_log::init() }.expect("unable to initialize");
mgba_log::fatal!("Hello, world!");

STATUS_REGISTER.write(3);
Expand Down
2 changes: 1 addition & 1 deletion tests/info/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ fn panic_handler(_: &core::panic::PanicInfo) -> ! {

#[no_mangle]
pub fn main() {
mgba_log::init().expect("unable to initialize");
unsafe { mgba_log::init() }.expect("unable to initialize");
log::info!("Hello, world!");

STATUS_REGISTER.write(3);
Expand Down
2 changes: 1 addition & 1 deletion tests/new_line/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ fn panic_handler(_: &core::panic::PanicInfo) -> ! {

#[no_mangle]
pub fn main() {
mgba_log::init().expect("unable to initialize");
unsafe { mgba_log::init() }.expect("unable to initialize");
log::info!("Hello,\nworld!");

STATUS_REGISTER.write(3);
Expand Down
2 changes: 1 addition & 1 deletion tests/null/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ fn panic_handler(_: &core::panic::PanicInfo) -> ! {

#[no_mangle]
pub fn main() {
mgba_log::init().expect("unable to initialize");
unsafe { mgba_log::init() }.expect("unable to initialize");
log::info!("\x00");

STATUS_REGISTER.write(3);
Expand Down
2 changes: 1 addition & 1 deletion tests/overflow/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ fn panic_handler(_: &core::panic::PanicInfo) -> ! {

#[no_mangle]
pub fn main() {
mgba_log::init().expect("unable to initialize");
unsafe { mgba_log::init() }.expect("unable to initialize");
log::info!("abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz");

STATUS_REGISTER.write(3);
Expand Down
2 changes: 1 addition & 1 deletion tests/sync/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ extern "C" fn irq_handler(_: IrqBits) {

#[no_mangle]
pub fn main() {
mgba_log::init().expect("unable to initialize");
unsafe { mgba_log::init() }.expect("unable to initialize");

RUST_IRQ_HANDLER.write(Some(irq_handler));
DISPSTAT.write(DisplayStatus::new().with_irq_vblank(true));
Expand Down
2 changes: 1 addition & 1 deletion tests/trace/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ fn panic_handler(_: &core::panic::PanicInfo) -> ! {

#[no_mangle]
pub fn main() {
mgba_log::init().expect("unable to initialize");
unsafe { mgba_log::init() }.expect("unable to initialize");
log::trace!("Hello, world!");

STATUS_REGISTER.write(3);
Expand Down
2 changes: 1 addition & 1 deletion tests/warn/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ fn panic_handler(_: &core::panic::PanicInfo) -> ! {

#[no_mangle]
pub fn main() {
mgba_log::init().expect("unable to initialize");
unsafe { mgba_log::init() }.expect("unable to initialize");
log::warn!("Hello, world!");

STATUS_REGISTER.write(3);
Expand Down

0 comments on commit cd302f9

Please sign in to comment.