Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Run unit tests inside Xcode playground
//: [Previous](@previous)
import Foundation
import XCTest
struct TodoItem {
let title: String
let dueBy: Date?
init(title: String) {
self.title = title
self.dueBy = nil
class TodoTests: XCTestCase {
override func setUp() {
override func tearDown() {
func testTodo() {
let taskTitle = "finish laundry"
let todo = TodoItem(title: taskTitle)
XCTAssertEqual(todo.title, taskTitle)

This comment has been minimized.

Copy link

tiagomartinho commented Oct 18, 2017

Should be:

Thanks for the playground!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.