Sha256: 01b6da78483abe43b632e34bd3a9c9b0aab4202a1c8e9afa3a0f0ec49ca25467
Contents?: true
Size: 872 Bytes
Versions: 7
Compression:
Stored size: 872 Bytes
Contents
mod iconst; struct Context; impl iconst::Context for Context {} fn main() { let mut ctx = Context; assert_eq!(iconst::constructor_X(&mut ctx, -1), Some(-2)); assert_eq!(iconst::constructor_X(&mut ctx, -2), Some(-3)); assert_eq!(iconst::constructor_X(&mut ctx, 0x7fff_ffff_ffff_ffff), Some(0x8000_0000_0000_0000u64 as i64)); assert_eq!(iconst::constructor_X(&mut ctx, 0xffff_ffff_ffff_fff0_u64 as i64), Some(1)); assert_eq!(iconst::constructor_Y(&mut ctx, 0x1000_0000_0000_0000_1234_5678_9abc_def0), Some(-1)); assert_eq!(iconst::constructor_Y(&mut ctx, 0xffff_ffff_ffff_ffff_ffff_ffff_ffff_ffffu128 as i128), Some(3)); assert_eq!(iconst::constructor_Y(&mut ctx, -0x1000_0000_0000_0000_1234_5678_9abc_def0), Some(1)); assert_eq!(iconst::constructor_Y(&mut ctx, -(0xffff_ffff_ffff_ffff_ffff_ffff_ffff_ffffu128 as i128)), Some(-3)); }
Version data entries
7 entries across 7 versions & 1 rubygems