Skip to content

Commit c6c29b0

Browse files
committed
Move selector tap tests after items
1 parent aa02305 commit c6c29b0

1 file changed

Lines changed: 21 additions & 21 deletions

File tree

server/src/main.rs

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -2743,27 +2743,6 @@ fn lerp(start: f64, end: f64, t: f64) -> f64 {
27432743
start + (end - start) * t
27442744
}
27452745

2746-
#[cfg(test)]
2747-
mod tests {
2748-
use super::normalize_accessibility_point_for_display;
2749-
2750-
#[test]
2751-
fn selector_tap_keeps_matching_orientation_coordinates() {
2752-
assert_eq!(
2753-
normalize_accessibility_point_for_display(240.0, 160.0, 480.0, 320.0, 1200.0, 800.0),
2754-
(0.5, 0.5)
2755-
);
2756-
}
2757-
2758-
#[test]
2759-
fn selector_tap_transposes_swapped_orientation_coordinates() {
2760-
assert_eq!(
2761-
normalize_accessibility_point_for_display(240.0, 226.0, 480.0, 320.0, 800.0, 1200.0),
2762-
(0.70625, 0.5)
2763-
);
2764-
}
2765-
}
2766-
27672746
fn hid_for_character(character: char) -> Option<(u16, u32)> {
27682747
let shift: u32 = 1;
27692748
let mapping = match character {
@@ -2916,3 +2895,24 @@ fn default_client_root() -> anyhow::Result<PathBuf> {
29162895

29172896
Ok(std::env::current_dir()?.join("client").join("dist"))
29182897
}
2898+
2899+
#[cfg(test)]
2900+
mod tests {
2901+
use super::normalize_accessibility_point_for_display;
2902+
2903+
#[test]
2904+
fn selector_tap_keeps_matching_orientation_coordinates() {
2905+
assert_eq!(
2906+
normalize_accessibility_point_for_display(240.0, 160.0, 480.0, 320.0, 1200.0, 800.0),
2907+
(0.5, 0.5)
2908+
);
2909+
}
2910+
2911+
#[test]
2912+
fn selector_tap_transposes_swapped_orientation_coordinates() {
2913+
assert_eq!(
2914+
normalize_accessibility_point_for_display(240.0, 226.0, 480.0, 320.0, 800.0, 1200.0),
2915+
(0.70625, 0.5)
2916+
);
2917+
}
2918+
}

0 commit comments

Comments
 (0)