use objc2_foundation::{ns_string, NSArray, NSDictionary, NSObject};
fn main() {
let obj = NSObject::new();
#[allow(clippy::eq_op)]
{
println!("{obj:?} == {obj:?}? {:?}", obj == obj);
}
let obj2 = NSObject::new();
println!("{obj:?} == {obj2:?}? {:?}", obj == obj2);
let objs = vec![obj, obj2];
let array = NSArray::from_retained_slice(&objs);
for obj in array.iter() {
println!("{obj:?}");
}
println!("{}", array.len());
let mut objs = array.to_vec();
let obj = objs.pop().unwrap();
let string = ns_string!("Hello, world!");
let _s = string.to_string();
println!("{string}");
let keys = &[string];
let objects = &[&*obj];
let dict = NSDictionary::from_slices(keys, objects);
println!("{:?}", dict.objectForKey(string));
println!("{}", dict.len());
}