wspr-beacon/testsuite/tests/loc.rs

21 lines
468 B
Rust
Raw Normal View History

2021-04-11 15:55:46 +02:00
#![no_std]
#![no_main]
use wspr_beacon as _; // memory layout + panic handler
// See https://crates.io/crates/defmt-test/0.1.0 for more documentation (e.g. about the 'state'
// feature)
#[defmt_test::tests]
mod tests {
2021-04-16 20:35:33 +02:00
use arrayvec::ArrayString;
2021-04-11 15:55:46 +02:00
use defmt::{assert, assert_eq};
2021-04-16 20:35:33 +02:00
use wspr_beacon::loc;
2021-04-11 15:55:46 +02:00
#[test]
fn assert_true() {
2021-04-16 20:35:33 +02:00
let res = loc::locator_from_coordinates(49.4395, 7.7635);
2021-04-11 15:55:46 +02:00
2021-04-16 20:35:33 +02:00
assert_eq!(res.as_str(), "JN39vk")
2021-04-11 15:55:46 +02:00
}
}