1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2025-03-12 14:16:06 +00:00

core(eckhart): Fix failing unit test and warnings

This commit is contained in:
Lukas Bielesch 2025-02-27 11:39:33 +01:00 committed by obrusvit
parent 224ef431be
commit 12bc5560fc
2 changed files with 6 additions and 5 deletions

View File

@ -338,8 +338,7 @@ impl<'a> crate::trace::Trace for Hint<'a> {
#[cfg(test)]
mod tests {
use super::{super::constant, *};
use crate::strutil::TString;
use super::*;
#[test]
fn test_instruction_hint_height() {

View File

@ -502,7 +502,10 @@ impl KeypadGrid {
mod tests {
use super::{
super::{super::constant::SCREEN, common::INPUT_TOUCH_HEIGHT},
super::{
super::constant::SCREEN,
common::{INPUT_TOUCH_HEIGHT, KEYPAD_VISIBLE_HEIGHT},
},
*,
};
@ -516,8 +519,7 @@ mod tests {
assert_eq!(
(ROWS as i16) * KeypadGrid::BUTTON_HEIGHT,
KeypadGrid::KEYPAD_TOUCH_HEIGHT
+ (ROWS as i16 - 1) * KeypadGrid::VERTICAL_BUTTON_SPACING,
KEYPAD_VISIBLE_HEIGHT + (ROWS as i16 - 1) * KeypadGrid::VERTICAL_BUTTON_SPACING,
"Keypad height does not match expected layout constraints"
);