Skip to content

Commit

Permalink
Fix test compilation
Browse files Browse the repository at this point in the history
  • Loading branch information
sosthene-nitrokey committed Nov 8, 2023
1 parent 066cb94 commit 2264dd1
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 3 deletions.
1 change: 1 addition & 0 deletions fuzz/fuzz_targets/fuzz_target_1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ impl iso7816::App for FuzzAppImpl {
impl App<{ apdu_dispatch::command::SIZE }, { apdu_dispatch::response::SIZE }> for FuzzAppImpl {
fn select(
&mut self,
_interface: iso7816::Interface,
_apdu: &apdu_dispatch::Command,
_reply: &mut apdu_dispatch::response::Data,
) -> AppResult {
Expand Down
21 changes: 18 additions & 3 deletions tests/dispatch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,12 @@ impl iso7816::App for TestApp1 {

// This app echos to Ins code 0x10
impl App<{ apdu_dispatch::command::SIZE }, { apdu_dispatch::response::SIZE }> for TestApp1 {
fn select(&mut self, _apdu: &Command, _reply: &mut response::Data) -> AppResult {
fn select(
&mut self,
_interface: dispatch::Interface,
_apdu: &Command,
_reply: &mut response::Data,
) -> AppResult {
Ok(())
}

Expand Down Expand Up @@ -119,7 +124,12 @@ impl iso7816::App for TestApp2 {

// This app echos to Ins code 0x20
impl App<{ apdu_dispatch::command::SIZE }, { apdu_dispatch::response::SIZE }> for TestApp2 {
fn select(&mut self, _apdu: &Command, _reply: &mut response::Data) -> AppResult {
fn select(
&mut self,
_interface: dispatch::Interface,
_apdu: &Command,
_reply: &mut response::Data,
) -> AppResult {
Ok(())
}

Expand Down Expand Up @@ -166,7 +176,12 @@ impl iso7816::App for PanicApp {

// This app echos to Ins code 0x20
impl App<{ apdu_dispatch::command::SIZE }, { apdu_dispatch::response::SIZE }> for PanicApp {
fn select(&mut self, _apdu: &Command, _reply: &mut response::Data) -> AppResult {
fn select(
&mut self,
_interface: dispatch::Interface,
_apdu: &Command,
_reply: &mut response::Data,
) -> AppResult {
panic!("Dont call the panic app");
}

Expand Down

0 comments on commit 2264dd1

Please sign in to comment.