Loading presentation...

Present Remotely

Send the link below via email or IM


Present to your audience

Start remote presentation

  • Invited audience members will follow you as you navigate and present
  • People invited to a presentation do not need a Prezi account
  • This link expires 10 minutes after you close the presentation
  • A maximum of 30 users can follow your presentation
  • Learn more about this feature in our knowledge base article

Do you really want to delete this prezi?

Neither you, nor the coeditors you shared it with will be able to recover it again.


5 Things About Unit Testing Swift Code

No description

Matt Buckley

on 31 January 2015

Comments (0)

Please log in to add your comment.

Report abuse

Transcript of 5 Things About Unit Testing Swift Code

When I wrote Ruby and Javascript code, we unit tested pretty much everything.
var x; ---------------> "x is null"

x = 1 ---------------> "x is 1"

x = "one" ---------------> "x is one"

x = "1" + "1" ---------------> "x is 11"

x = Cactus() ---------------> "x is a cactus"

x = Cactus ---------------> "x is Cactus. Not a catcus, but Cactus. The one that lives in the Realm of Forms."

Optionals change the picture. Non-nil assertions don't add much.
Back to Unit Testing: A Recovering Web Dev's Journey Through Objective-C and Swift
Javascript don't even care.
For this reason, you need to care.

Both assertions and unit tests have a place. Non-nil assertions everywhere.
Code snippet

Code Snippet
describe("A test suite for x", function() {
it("x is equal to 1", function() {
So We Wrote Tests
Full transcript