diff --git a/src/encoding/text.rs b/src/encoding/text.rs index 216ddde0..7cf22e4f 100644 --- a/src/encoding/text.rs +++ b/src/encoding/text.rs @@ -709,7 +709,7 @@ mod tests { use crate::metrics::{counter::Counter, exemplar::CounterWithExemplar}; use pyo3::{prelude::*, types::PyModule}; use std::borrow::Cow; - use std::sync::atomic::AtomicU32; + use std::sync::atomic::{AtomicI32, AtomicU32}; #[test] fn encode_counter() { @@ -717,6 +717,9 @@ mod tests { let mut registry = Registry::default(); registry.register("my_counter", "My counter", counter); + let counter_u32 = Counter::::default(); + registry.register("u32_counter", "Counter::", counter_u32); + let mut encoded = String::new(); encode(&mut encoded, ®istry).unwrap(); @@ -780,6 +783,9 @@ mod tests { let gauge = Gauge::::default(); registry.register("u32_gauge", "Gauge::", gauge); + let gauge_i32 = Gauge::::default(); + registry.register("i32_gauge", "Gauge::", gauge_i32); + let mut encoded = String::new(); encode(&mut encoded, ®istry).unwrap();