MCPcopy Index your code
hub / github.com/RustPython/RustPython / test_add_py_integers

Function test_add_py_integers

crates/vm/src/vm/interpreter.rs:565–573  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

563
564 #[test]
565 fn test_add_py_integers() {
566 Interpreter::without_stdlib(Default::default()).enter(|vm| {
567 let a: PyObjectRef = vm.ctx.new_int(33_i32).into();
568 let b: PyObjectRef = vm.ctx.new_int(12_i32).into();
569 let res = vm._add(&a, &b).unwrap();
570 let value = int::get_value(&res);
571 assert_eq!(*value, 45_i32.to_bigint().unwrap());
572 })
573 }
574
575 #[test]
576 fn test_multiply_str() {

Callers

nothing calls this directly

Calls 5

get_valueFunction · 0.50
enterMethod · 0.45
new_intMethod · 0.45
unwrapMethod · 0.45
_addMethod · 0.45

Tested by

no test coverage detected