Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
edg-l committed Jan 20, 2025
1 parent 3f1eb7e commit d4ddf90
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/libfuncs/bounded_int.rs
Original file line number Diff line number Diff line change
Expand Up @@ -830,7 +830,7 @@ mod test {
use core::internal::{OptionRev, bounded_int::BoundedInt};
use core::internal::bounded_int;
fn main() -> BoundedInt<-128, 126> {
let num = match bounded_int::trim::<i8, 0x7f>(1) {
let num = match bounded_int::trim_max::<i8>(1) {
OptionRev::Some(n) => n,
OptionRev::None => 0,
};
Expand Down Expand Up @@ -861,7 +861,7 @@ mod test {
use core::internal::{OptionRev, bounded_int::BoundedInt};
use core::internal::bounded_int;
fn main() -> BoundedInt<-127, 127> {
let num = match bounded_int::trim::<i8, -0x80>(1) {
let num = match bounded_int::trim_min::<i8>(1) {
OptionRev::Some(n) => n,
OptionRev::None => 1,
};
Expand Down Expand Up @@ -892,7 +892,7 @@ mod test {
use core::internal::{OptionRev, bounded_int::BoundedInt};
use core::internal::bounded_int;
fn main() -> BoundedInt<0, 4294967294> {
let num = match bounded_int::trim::<u32, 0xffffffff>(0xfffffffe) {
let num = match bounded_int::trim_max::<u32>(0xfffffffe) {
OptionRev::Some(n) => n,
OptionRev::None => 0,
};
Expand Down Expand Up @@ -923,7 +923,7 @@ mod test {
use core::internal::{OptionRev, bounded_int::BoundedInt};
use core::internal::bounded_int;
fn main() -> BoundedInt<-32767, 32767> {
let num = match bounded_int::trim::<i16, -0x8000>(-0x8000) {
let num = match bounded_int::trim_min::<i16>(-0x8000) {
OptionRev::Some(n) => n,
OptionRev::None => 0,
};
Expand Down

0 comments on commit d4ddf90

Please sign in to comment.