mirror of
https://github.com/maxgoedjen/secretive.git
synced 2025-08-19 11:40:56 +00:00
* Enable language mode
* WIP
* WIP
* Fix concurrency issues in SmartCardStore
* Switch to SMAppService
* Bump runners
* Base
* Finish Testing migration
* Tweak async for updater
* More
* Backport mutex
* Revert "Backport mutex"
This reverts commit 9b02afb20c
.
* WIP
* Reenable
* Fix preview.
* Update package.
* Bump to latest public macOS and Xcode
* Bump back down to 6.1
* Update to Xcode 26.
* Fixed tests.
* More cleanup
* Env fixes
* var->let
* Cleanup
* Persist auth async
* Whitespace.
* Whitespace.
* Cleanup.
* Cleanup
* Redoing locks in actors bc of observable
* Actors.
* .
* Specify b5
* Update package to 6.2
* Fix disabled updater
* Remove preconcurrency warning
* Move updater init
53 lines
1.2 KiB
Swift
53 lines
1.2 KiB
Swift
import Testing
|
|
import Foundation
|
|
@testable import Brief
|
|
|
|
@Suite struct SemVerTests {
|
|
|
|
@Test func equal() {
|
|
let current = SemVer("1.0.2")
|
|
let old = SemVer("1.0.2")
|
|
#expect(!(current > old))
|
|
}
|
|
|
|
@Test func patchGreaterButMinorLess() {
|
|
let current = SemVer("1.1.0")
|
|
let old = SemVer("1.0.2")
|
|
#expect(current > old)
|
|
}
|
|
|
|
@Test func majorSameMinorGreater() {
|
|
let current = SemVer("1.0.2")
|
|
let new = SemVer("1.0.3")
|
|
#expect(current < new)
|
|
}
|
|
|
|
@Test func majorGreaterMinorLesser() {
|
|
let current = SemVer("1.0.2")
|
|
let new = SemVer("2.0.0")
|
|
#expect(current < new)
|
|
}
|
|
|
|
@Test func regularParsing() {
|
|
let current = SemVer("1.0.2")
|
|
#expect(current.versionNumbers == [1, 0, 2])
|
|
}
|
|
|
|
@Test func noPatch() {
|
|
let current = SemVer("1.1")
|
|
#expect(current.versionNumbers == [1, 1, 0])
|
|
}
|
|
|
|
@Test func garbage() {
|
|
let current = SemVer("Test")
|
|
#expect(current.versionNumbers == [0, 0, 0])
|
|
}
|
|
|
|
@Test func beta() {
|
|
let current = SemVer("1.0.2")
|
|
let new = SemVer("1.1.0_beta1")
|
|
#expect(current < new)
|
|
}
|
|
|
|
}
|