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

Function test_method

src/runtime.rs:548–559  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

546
547 #[test]
548 fn test_method() {
549 let cls = test_utils::custom_class();
550 let sel = Sel::register("foo");
551 let method = cls.instance_method(sel).unwrap();
552 assert!(method.name().name() == "foo");
553 assert!(method.arguments_count() == 2);
554 assert!(method.return_type() == <u32>::encode());
555 assert!(method.argument_type(1).unwrap() == Sel::encode());
556
557 let methods = cls.instance_methods();
558 assert!(methods.len() > 0);
559 }
560
561 #[test]
562 fn test_class() {

Callers

nothing calls this directly

Calls 3

custom_classFunction · 0.85
instance_methodMethod · 0.80
instance_methodsMethod · 0.80

Tested by

no test coverage detected