forked from mcintyre94/wisp
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathClaudeModelTests.swift
More file actions
29 lines (24 loc) · 854 Bytes
/
ClaudeModelTests.swift
File metadata and controls
29 lines (24 loc) · 854 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
import Testing
@testable import Wisp
@Suite("ClaudeModel")
struct ClaudeModelTests {
@Test func allCasesHaveDisplayNames() {
#expect(ClaudeModel.sonnet.displayName == "Sonnet")
#expect(ClaudeModel.opus.displayName == "Opus")
#expect(ClaudeModel.haiku.displayName == "Haiku")
}
@Test func rawValuesAre1MContextAliases() {
#expect(ClaudeModel.sonnet.rawValue == "sonnet[1m]")
#expect(ClaudeModel.opus.rawValue == "opus[1m]")
#expect(ClaudeModel.haiku.rawValue == "haiku")
}
@Test func identifiableUsesRawValue() {
for model in ClaudeModel.allCases {
#expect(model.id == model.rawValue)
}
}
@Test func initFromRawValue() {
#expect(ClaudeModel(rawValue: "opus[1m]") == .opus)
#expect(ClaudeModel(rawValue: "invalid") == nil)
}
}