Skip to content

Commit

Permalink
test(portability): Test i32 for Gauge
Browse files Browse the repository at this point in the history
Signed-off-by: Léo Gillot-Lamure <[email protected]>
  • Loading branch information
navaati committed Jul 17, 2024
1 parent fc0a6fd commit 8f6b5a0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/encoding/text.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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::{AtomicU32, AtomicI32};

#[test]
fn encode_counter() {
Expand Down Expand Up @@ -783,6 +783,9 @@ mod tests {
let gauge = Gauge::<u32, AtomicU32>::default();
registry.register("u32_gauge", "Gauge::<u32, AtomicU32>", gauge);

let gauge_i32 = Gauge::<i32, AtomicI32>::default();
registry.register("i32_gauge", "Gauge::<i32, AtomicU32>", gauge_i32);

let mut encoded = String::new();

encode(&mut encoded, &registry).unwrap();
Expand Down

0 comments on commit 8f6b5a0

Please sign in to comment.