mirror of
https://codeberg.org/secana/Forji.git
synced 2026-06-16 05:13:55 -07:00
test: use display-name form with camelCase test names
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
parent
fcff44a362
commit
fd8a9b1bbe
1 changed files with 5 additions and 5 deletions
|
|
@ -5,24 +5,24 @@ import Testing
|
|||
struct LabelColorHexTests {
|
||||
// MARK: - Six-digit colors
|
||||
|
||||
@Test func `six digit hex parses`() {
|
||||
@Test("six digit hex parses") func sixDigitHexParses() {
|
||||
#expect(Color(hex: "#ff0000") != nil)
|
||||
#expect(Color(hex: "00ff00") != nil)
|
||||
}
|
||||
|
||||
@Test func `six digit value matches`() throws {
|
||||
@Test("six digit value matches") func sixDigitValueMatches() throws {
|
||||
let rgb = try #require(Color.rgbValue(hex: "#3366cc"))
|
||||
#expect(rgb == 0x3366CC)
|
||||
}
|
||||
|
||||
// MARK: - Three-digit shorthand
|
||||
|
||||
@Test func `three digit shorthand parses`() {
|
||||
@Test("three digit shorthand parses") func threeDigitShorthandParses() {
|
||||
#expect(Color(hex: "#f00") != nil)
|
||||
#expect(Color(hex: "abc") != nil)
|
||||
}
|
||||
|
||||
@Test func `three digit shorthand expands like six digit`() throws {
|
||||
@Test("three digit shorthand expands like six digit") func threeDigitShorthandExpandsLikeSixDigit() throws {
|
||||
#expect(Color(hex: "#f00") == Color(hex: "#ff0000"))
|
||||
#expect(Color(hex: "abc") == Color(hex: "aabbcc"))
|
||||
let rgb = try #require(Color.rgbValue(hex: "#f00"))
|
||||
|
|
@ -31,7 +31,7 @@ struct LabelColorHexTests {
|
|||
|
||||
// MARK: - Invalid input
|
||||
|
||||
@Test func `invalid hex returns nil`() {
|
||||
@Test("invalid hex returns nil") func invalidHexReturnsNil() {
|
||||
#expect(Color(hex: "") == nil)
|
||||
#expect(Color(hex: "#ff00") == nil)
|
||||
#expect(Color(hex: "12345") == nil)
|
||||
|
|
|
|||
Loading…
Reference in a new issue