File: integer_convert_to_value.rs

package info (click to toggle)
rust-magnus 0.7.1-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,468 kB
  • sloc: ruby: 150; sh: 17; makefile: 2
file content (14 lines) | stat: -rw-r--r-- 328 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#[test]
fn it_converts_integers_to_value() {
    let ruby = unsafe { magnus::embed::init() };

    magnus::rb_assert!(ruby, "val == 0", val = 0u8);

    magnus::rb_assert!(ruby, "val == -1", val = -1i64);

    magnus::rb_assert!(
        ruby,
        "val == 9223372036854775807",
        val = 9223372036854775807i64
    );
}