MCPcopy Create free account
hub / github.com/SSheldon/rust-objc / test_object

Function test_object

src/runtime.rs:623–631  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

621
622 #[test]
623 fn test_object() {
624 let mut obj = test_utils::custom_object();
625 assert!(obj.class() == test_utils::custom_class());
626 let result: u32 = unsafe {
627 obj.set_ivar("_foo", 4u32);
628 *obj.get_ivar("_foo")
629 };
630 assert!(result == 4);
631 }
632}

Callers

nothing calls this directly

Calls 3

custom_objectFunction · 0.85
set_ivarMethod · 0.80
get_ivarMethod · 0.80

Tested by

no test coverage detected