<html><head><style>body{font-family:Helvetica,Arial;font-size:13px}</style></head><body style="word-wrap:break-word"><div id="bloop_customfont" style="margin:0px">| <a href="https://lists.swift.org/pipermail/swift-evolution/Week-of-Mon-20170417/035965.html">https://lists.swift.org/pipermail/swift-evolution/Week-of-Mon-20170417/035965.html</a></div><div id="bloop_customfont" style="margin:0px"><br></div><div id="bloop_customfont" style="margin:0px">My experience with XCTest and optionals recently was that XCTest runs in a separate process and reloads the application for subsequent tests. I auto-converted some Java code and added force-unwrap everywhere as a first stage. The offending optionals get fixed quite fast and I don’t think they are meant to be part of the testing process.</div><div id="bloop_customfont" style="margin:0px"><br></div><div id="bloop_customfont" style="margin:0px">I agree you might want to have a “fatal error” test case though, to be sure your application doesn’t accept strange input. If you really need this now, there seems to be a library for it - <a href="https://github.com/mohamede1945/AssertionsTestingExample">https://github.com/mohamede1945/AssertionsTestingExample</a>.</div><div id="bloop_sign_1492874306301264128" class="bloop_sign"></div></body></html>