Myna/Tests/MynaTests/UnsafeExtensionTests.swift
Ada Freya 4d199a0bd2
Some checks failed
[REUSE] Code Quality / REUSE (push) Has been cancelled
[Swift] Code Quality / Swift ${{ matrix.swift }} on ${{ matrix.os }} (macos-latest) (push) Has been cancelled
[Swift] Code Quality / Swift ${{ matrix.swift }} on ${{ matrix.os }} (ubuntu-latest) (push) Has been cancelled
[Swift] Test / Swift ${{ matrix.swift }} on ${{ matrix.os }} (macos-latest) (push) Has been cancelled
[Swift] Test / Swift ${{ matrix.swift }} on ${{ matrix.os }} (ubuntu-latest) (push) Has been cancelled
chore: update copyright
2025-12-25 13:01:41 +05:30

25 lines
491 B
Swift

// SPDX-FileCopyrightText: 2024-2026 Neptuwunium <ada@chronovore.dev>
// SPDX-License-Identifier: EUPL-1.2
import Foundation
import Testing
@testable import Myna
struct UnsafeDataExtensionTests {
@Test func random() async throws {
let data = try Data.random(count: 16)
#expect(data.count == 16)
#expect(
!data.allSatisfy { value in
value == 0
})
}
@Test func randomZero() async throws {
#expect(throws: MynaError.systemError) {
try Data.random(count: 0)
}
}
}