Skip to content

Commit

Permalink
define RUBY_FIXNUM_{MIN,MAX} for tests as rust types
Browse files Browse the repository at this point in the history
rather than c types that are platform dependant aliases
  • Loading branch information
matsadler committed Aug 17, 2023
1 parent 3ad9aae commit 881329b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/integer_traits.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
use std::os::raw::{c_long, c_ulong};
use std::os::raw::c_long;

use magnus::{eval, Integer};

const RUBY_FIXNUM_MAX: c_ulong = (c_long::MAX / 2) as c_ulong;
const RUBY_FIXNUM_MIN: c_long = c_long::MIN / 2;
const RUBY_FIXNUM_MAX: u64 = (c_long::MAX / 2) as u64;
const RUBY_FIXNUM_MIN: i64 = (c_long::MIN / 2) as i64;

#[test]
fn test_all() {
Expand Down

0 comments on commit 881329b

Please sign in to comment.