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

Function test_send_message_super

src/message/mod.rs:271–283  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

269
270 #[test]
271 fn test_send_message_super() {
272 let obj = test_utils::custom_subclass_object();
273 let superclass = test_utils::custom_class();
274 unsafe {
275 let _: () = msg_send![obj, setFoo:4u32];
276 let foo: u32 = msg_send![super(obj, superclass), foo];
277 assert!(foo == 4);
278
279 // The subclass is overriden to return foo + 2
280 let foo: u32 = msg_send![obj, foo];
281 assert!(foo == 6);
282 }
283 }
284
285 #[test]
286 fn test_verify_message() {

Callers

nothing calls this directly

Calls 2

custom_subclass_objectFunction · 0.85
custom_classFunction · 0.85

Tested by

no test coverage detected