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:
parent
224ef431be
commit
12bc5560fc
@ -338,8 +338,7 @@ impl<'a> crate::trace::Trace for Hint<'a> {
|
|||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod tests {
|
mod tests {
|
||||||
use super::{super::constant, *};
|
use super::*;
|
||||||
use crate::strutil::TString;
|
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_instruction_hint_height() {
|
fn test_instruction_hint_height() {
|
||||||
|
@ -502,7 +502,10 @@ impl KeypadGrid {
|
|||||||
mod tests {
|
mod tests {
|
||||||
|
|
||||||
use super::{
|
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!(
|
assert_eq!(
|
||||||
(ROWS as i16) * KeypadGrid::BUTTON_HEIGHT,
|
(ROWS as i16) * KeypadGrid::BUTTON_HEIGHT,
|
||||||
KeypadGrid::KEYPAD_TOUCH_HEIGHT
|
KEYPAD_VISIBLE_HEIGHT + (ROWS as i16 - 1) * KeypadGrid::VERTICAL_BUTTON_SPACING,
|
||||||
+ (ROWS as i16 - 1) * KeypadGrid::VERTICAL_BUTTON_SPACING,
|
|
||||||
"Keypad height does not match expected layout constraints"
|
"Keypad height does not match expected layout constraints"
|
||||||
);
|
);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user