Files
Aislo/resources/tester/fixtures/d03_638_set_cases.json
T
eomsangdonandClaude Opus 5.5 83f3bc0a5c feat(638-2): 예정노선 노선 세트 화면 셈 — 세트 지정 · 끝에서 나눔 · 이웃 합침 · 고를 세트 · [잇기](요구 547 · 548)
- 새 logic/D03_PlanAnalysis_Group.ts: assignSet(고른 구간 끝 나눔 → 세트 → 같은 선 이웃 같은 세트 하나 · 앞 id) · mergeSets(서버 Network.derive 짝) · setChoices(있는 세트 + 해마다 새 번호) · joinEnds(닿음 바로 · 떨어짐 곧은 토막 덧 = 앞 선 세트)
- Plan.ts 세 곳: PlanPiece.set · 새 선 처음 세트(사업연도 시작 해 새 번호 · 갈래 = 붙은 자리 세트 · 옛 꼴 = 그 해 최댓값 + 1) · 이음 합침 비교 = 세트 · 661 줄 그대로
- Select.ts 끌어 고르기 시험 조각에 set 칸(타입 맞춤)
- Api.ts 꼴: derived.sets(PlanSetView · 638-1 서버 셈)
- 시험 test_638_group.py · 거울 사례 fixtures/d03_638_set_cases.json(sub3 638-1 과 같은 파일)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 11:31:17 +09:00

534 lines
11 KiB
JSON

{
"about": "PLAN 638 세트 합침 거울 사례 — 서버 Network.derive · 화면 Group.mergeSets(fromServer 뒤) 같은 답. 입력 = PUT 꼴(lines · marks · pieces) · 기대 = (선 차례, from_m) 차례 조각.",
"year_start": 2027,
"cases": [
{
"name": "같은 선 이웃 같은 세트 = 하나(앞 id)",
"network": {
"lines": [
{
"id": "main",
"vertices": [
[0, 0],
[100, 0]
],
"branch": null
}
],
"marks": [
{
"line": "main",
"at_m": 30
},
{
"line": "main",
"at_m": 60
}
],
"pieces": [
{
"id": "p1",
"line": "main",
"from_m": 0,
"to_m": 30,
"year": 2027,
"set": 1
},
{
"id": "p2",
"line": "main",
"from_m": 30,
"to_m": 60,
"year": 2027,
"set": 1
},
{
"id": "p3",
"line": "main",
"from_m": 60,
"to_m": 100,
"year": 2027,
"set": 2
}
]
},
"expect": [
{
"id": "p1",
"line": "main",
"from_m": 0,
"to_m": 60,
"year": 2027,
"set": 1
},
{
"id": "p3",
"line": "main",
"from_m": 60,
"to_m": 100,
"year": 2027,
"set": 2
}
]
},
{
"name": "셋 이어 합침 · 앞 조각 다른 세트 그대로",
"network": {
"lines": [
{
"id": "main",
"vertices": [
[0, 0],
[100, 0]
],
"branch": null
}
],
"marks": [
{
"line": "main",
"at_m": 20
},
{
"line": "main",
"at_m": 50
},
{
"line": "main",
"at_m": 80
}
],
"pieces": [
{
"id": "p1",
"line": "main",
"from_m": 0,
"to_m": 20,
"year": 2027,
"set": 1
},
{
"id": "p4",
"line": "main",
"from_m": 20,
"to_m": 50,
"year": 2028,
"set": 2
},
{
"id": "p2",
"line": "main",
"from_m": 50,
"to_m": 80,
"year": 2028,
"set": 2
},
{
"id": "p3",
"line": "main",
"from_m": 80,
"to_m": 100,
"year": 2028,
"set": 2
}
]
},
"expect": [
{
"id": "p1",
"line": "main",
"from_m": 0,
"to_m": 20,
"year": 2027,
"set": 1
},
{
"id": "p4",
"line": "main",
"from_m": 20,
"to_m": 100,
"year": 2028,
"set": 2
}
]
},
{
"name": "같은 해 다른 번호 · 다른 해 같은 번호 = 안 합침",
"network": {
"lines": [
{
"id": "main",
"vertices": [
[0, 0],
[90, 0]
],
"branch": null
}
],
"marks": [
{
"line": "main",
"at_m": 30
},
{
"line": "main",
"at_m": 60
}
],
"pieces": [
{
"id": "p1",
"line": "main",
"from_m": 0,
"to_m": 30,
"year": 2027,
"set": 1
},
{
"id": "p2",
"line": "main",
"from_m": 30,
"to_m": 60,
"year": 2027,
"set": 2
},
{
"id": "p3",
"line": "main",
"from_m": 60,
"to_m": 90,
"year": 2028,
"set": 2
}
]
},
"expect": [
{
"id": "p1",
"line": "main",
"from_m": 0,
"to_m": 30,
"year": 2027,
"set": 1
},
{
"id": "p2",
"line": "main",
"from_m": 30,
"to_m": 60,
"year": 2027,
"set": 2
},
{
"id": "p3",
"line": "main",
"from_m": 60,
"to_m": 90,
"year": 2028,
"set": 2
}
]
},
{
"name": "다른 선 같은 세트 = 안 합침(갈래 · 떨어진 선)",
"network": {
"lines": [
{
"id": "main",
"vertices": [
[0, 0],
[50, 0],
[100, 0]
],
"branch": null
},
{
"id": "branch-1",
"vertices": [
[50, 0],
[50, 40]
],
"branch": {
"line": "main",
"vertex": 1
}
},
{
"id": "line-2",
"vertices": [
[100, 0],
[150, 0]
],
"branch": null
}
],
"marks": [],
"pieces": [
{
"id": "p1",
"line": "main",
"from_m": 0,
"to_m": 100,
"year": 2027,
"set": 1
},
{
"id": "p2",
"line": "branch-1",
"from_m": 0,
"to_m": 40,
"year": 2027,
"set": 1
},
{
"id": "p3",
"line": "line-2",
"from_m": 0,
"to_m": 50,
"year": 2027,
"set": 1
}
]
},
"expect": [
{
"id": "p1",
"line": "main",
"from_m": 0,
"to_m": 100,
"year": 2027,
"set": 1
},
{
"id": "p2",
"line": "branch-1",
"from_m": 0,
"to_m": 40,
"year": 2027,
"set": 1
},
{
"id": "p3",
"line": "line-2",
"from_m": 0,
"to_m": 50,
"year": 2027,
"set": 1
}
]
},
{
"name": "옛 꼴(set 없음) = 선 · from_m 차례로 그 해 1 · 2 …",
"network": {
"lines": [
{
"id": "main",
"vertices": [
[0, 0],
[100, 0]
],
"branch": null
},
{
"id": "line-1",
"vertices": [
[0, 50],
[80, 50]
],
"branch": null
}
],
"marks": [
{
"line": "main",
"at_m": 40
},
{
"line": "main",
"at_m": 70
}
],
"pieces": [
{
"id": "p1",
"line": "main",
"from_m": 0,
"to_m": 40,
"year": 2027
},
{
"id": "p2",
"line": "main",
"from_m": 40,
"to_m": 70,
"year": 2028
},
{
"id": "p4",
"line": "main",
"from_m": 70,
"to_m": 100,
"year": 2027
},
{
"id": "p3",
"line": "line-1",
"from_m": 0,
"to_m": 80,
"year": 2027
}
]
},
"expect": [
{
"id": "p1",
"line": "main",
"from_m": 0,
"to_m": 40,
"year": 2027,
"set": 1
},
{
"id": "p2",
"line": "main",
"from_m": 40,
"to_m": 70,
"year": 2028,
"set": 1
},
{
"id": "p4",
"line": "main",
"from_m": 70,
"to_m": 100,
"year": 2027,
"set": 2
},
{
"id": "p3",
"line": "line-1",
"from_m": 0,
"to_m": 80,
"year": 2027,
"set": 3
}
]
},
{
"name": "set 빠진 조각 하나 = 그 해 최댓값 + 1",
"network": {
"lines": [
{
"id": "main",
"vertices": [
[0, 0],
[100, 0]
],
"branch": null
}
],
"marks": [
{
"line": "main",
"at_m": 50
}
],
"pieces": [
{
"id": "p1",
"line": "main",
"from_m": 0,
"to_m": 50,
"year": 2027,
"set": 3
},
{
"id": "p2",
"line": "main",
"from_m": 50,
"to_m": 100,
"year": 2027
}
]
},
"expect": [
{
"id": "p1",
"line": "main",
"from_m": 0,
"to_m": 50,
"year": 2027,
"set": 3
},
{
"id": "p2",
"line": "main",
"from_m": 50,
"to_m": 100,
"year": 2027,
"set": 4
}
]
},
{
"name": "최댓값 = 그 해 모든 조각(뒤 선 것 포함)",
"network": {
"lines": [
{
"id": "main",
"vertices": [
[0, 0],
[100, 0]
],
"branch": null
},
{
"id": "line-1",
"vertices": [
[0, 50],
[80, 50]
],
"branch": null
}
],
"marks": [],
"pieces": [
{
"id": "p1",
"line": "main",
"from_m": 0,
"to_m": 100,
"year": 2027
},
{
"id": "p2",
"line": "line-1",
"from_m": 0,
"to_m": 80,
"year": 2027,
"set": 2
}
]
},
"expect": [
{
"id": "p1",
"line": "main",
"from_m": 0,
"to_m": 100,
"year": 2027,
"set": 3
},
{
"id": "p2",
"line": "line-1",
"from_m": 0,
"to_m": 80,
"year": 2027,
"set": 2
}
]
}
]
}