I could not really find this in the documentation ...
I'm writing some unit tests and one of the tests that is supposed to fail is [NSURL URLWithString: @"cow"]
. Because cow
is not a valid URL.
However, it is happily parsed by NSURL
with no errors at all. It does not return nil
and it does not throw an exception. Calling [url absoluteString]
on it turns it back into @"cow"
.
What is going on here? Is NSURL
really supposed to allow this?