Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions Tests/MyLibraryTests/MyLibraryTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,16 @@
//
//===--------------------------------------------------------------------

import Testing
@testable import MyLibrary
import XCTest

final class MyLibraryTests: XCTestCase {
func testEmail() throws {
struct MyLibraryTests {
@Test func email() throws {
let email = try Email("john.appleseed@apple.com")
XCTAssertEqual(email.description, "john.appleseed@apple.com")
#expect(email.description == "john.appleseed@apple.com")

XCTAssertThrowsError(try Email("invalid"))
#expect(throws: (any Error).self) {
try Email("invalid")
}
}
}