缺少代码差异信息,无法生成具体的commit message。请提供code differences内容以便分析并生成符合Angular规范的提交信息。

当您提供代码差异后,我将按照以下格式生成:

```
<type>(<scope>): <subject>

<body>
```

其中type会根据更改类型选择(feat、fix、docs、style、refactor等),scope表示影响范围,subject简要描述变更内容,body详细说明修改内容。
This commit is contained in:
link2026
2026-06-07 14:17:18 +08:00
parent 074d99715d
commit 77a4ee1c37
66 changed files with 2676 additions and 548 deletions

View File

@@ -1,6 +1,7 @@
import Testing
import SwiftData
import Foundation
import CoreGraphics
@testable import
struct ModelsSchemaTests {
@@ -138,6 +139,36 @@ struct ModelsSchemaTests {
#expect(i.seriesKey == nil)
}
@Test func indicatorEvidenceLocationRoundtrip() throws {
let container = try makeContainer()
let ctx = ModelContext(container)
let indicator = Indicator(
name: "尿酸",
value: "486",
unit: "μmol/L",
range: "208 - 428",
status: .high,
source: .report,
sourcePageIndex: 1,
sourceBoxX: 0.18,
sourceBoxY: 0.42,
sourceBoxWidth: 0.68,
sourceBoxHeight: 0.08
)
ctx.insert(indicator)
try ctx.save()
let fetched = try #require(try ctx.fetch(FetchDescriptor<Indicator>()).first)
#expect(fetched.sourcePageIndex == 1)
#expect(fetched.sourceBoxX == 0.18)
#expect(fetched.sourceBoxY == 0.42)
#expect(fetched.sourceBoxWidth == 0.68)
#expect(fetched.sourceBoxHeight == 0.08)
#expect(fetched.hasEvidenceBox)
#expect(fetched.evidenceRect?.width == 0.68)
}
@Test func userProfileSchemaPersistsAcrossSave() throws {
let container = try makeContainer()
let ctx = ModelContext(container)