Skip to content

Instantly share code, notes, and snippets.

@obegendi
Created September 24, 2024 12:40
Show Gist options
  • Save obegendi/1376c3e0451b2cb1096a2ecd38526c7d to your computer and use it in GitHub Desktop.
Save obegendi/1376c3e0451b2cb1096a2ecd38526c7d to your computer and use it in GitHub Desktop.
import XCTest
import Testing
@testable import SwiftTestingExample
@Test("Add Two Negative Number")
func addTwoNegativeNumber() {
let calculator = Calculator()
let num1 = -2
let num2 = -5
let sum = calculator.add(num1: num1, num2: num2)
#expect(sum == -7)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment