test(B06): 54-10 흙막이 단 시험 기대값을 54-42 · 54-51 규칙으로 — 형태별 높이 한도 없음 · 0 이하만 0.1 하한
- 옛 기대: 돌쌓기(메) 2.0 자름 · 폼 되돌림 · 「형태 한계」 토스트 — 54-42 에서 형태별 한도 삭제 · 54-51 에서 토스트 삭제 - 헬퍼 기하 흉내도 한도 없이 입력 높이 그대로 · 같은 값 단계는 같은 2.5 를 보냄 - 하한 단계 더함: 높이 0 → 0.1 그림 · 폼 되돌림 · 토스트 없음 - 코드 그대로 · 단 나누기 · 구간값 · 개수 가림 시험 그대로 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BVPp2o6Mh2FZJr72yW3ofZ
This commit is contained in:
@@ -138,13 +138,8 @@ const ctx = {
|
||||
updates.push({ role, ...patch });
|
||||
const now = adjusts[role] ?? { x: 0, d: null, h: null, m: null };
|
||||
const m = patch.m === undefined ? now.m : patch.m;
|
||||
// 기하 되받기(syncApplied) 흉내 — 형태 한계로 자름(돌쌓기(메) 2.0)
|
||||
const h =
|
||||
patch.h == null
|
||||
? patch.h === undefined
|
||||
? now.h
|
||||
: null
|
||||
: Math.min(patch.h, m === "돌쌓기(메)" ? 2.0 : 5.0);
|
||||
// 기하 되받기(syncApplied) 흉내 — 형태별 높이 한도 없음(54-42 · 입력 높이 그대로)
|
||||
const h = patch.h === undefined ? now.h : patch.h;
|
||||
adjusts[role] = { ...now, h, m };
|
||||
},
|
||||
},
|
||||
@@ -173,9 +168,18 @@ applyPipeOptionsToCache(ctx, 100, {
|
||||
soil_add_1_form: "콘크리트",
|
||||
soil_add_1_height: 1.8,
|
||||
soil_add_2_form: "돌쌓기(메)",
|
||||
soil_add_2_height: 2.0,
|
||||
soil_add_2_height: 2.5,
|
||||
});
|
||||
out.same = { updates: updates.splice(0), tiers: tiers.splice(0) };
|
||||
// 그림이 안 서는 높이(0 이하)만 하한 0.1 에서 멈춰 폼에 되돌림 · 토스트 없음(54-51)
|
||||
applyPipeOptionsToCache(ctx, 100, {
|
||||
soil_add_1_form: "콘크리트",
|
||||
soil_add_1_height: 0,
|
||||
soil_add_2_form: "돌쌓기(메)",
|
||||
soil_add_2_height: 2.5,
|
||||
});
|
||||
out.floor = { updates: updates.splice(0), overrides: overrides.splice(0) };
|
||||
out.toasts.push(...toasts.splice(0));
|
||||
// 비운 칸 = 자동(높이 · 형태) · 구간값은 그대로
|
||||
applyPipeOptionsToCache(ctx, 100, {});
|
||||
out.cleared = { updates: updates.splice(0), tiers: tiers.splice(0) };
|
||||
|
||||
@@ -39,7 +39,7 @@ def extras(updates: list[dict]) -> list[dict]:
|
||||
def test_컨테이너_형태_높이가_그_단_조정값으로(out) -> None:
|
||||
assert extras(out["filled"]["updates"]) == [
|
||||
{"role": "extra0", "h": 1.8, "m": "콘크리트"},
|
||||
{"role": "extra1", "h": 2.0, "m": "돌쌓기(메)"},
|
||||
{"role": "extra1", "h": 2.5, "m": "돌쌓기(메)"}, # 형태별 높이 한도 없음(54-42)
|
||||
]
|
||||
|
||||
|
||||
@@ -48,9 +48,12 @@ def test_지형이_못_세운_단은_그림에_안_감(out) -> None:
|
||||
assert "extra2" not in roles
|
||||
|
||||
|
||||
def test_높이_한도는_형태_규칙_그대로_폼에_되돌림(out) -> None:
|
||||
assert out["filled"]["overrides"] == [{"soil_add_2_height": 2}]
|
||||
assert out["toasts"] == ["흙막이 2 높이는 형태 한계로 2.0m까지만 적용됩니다."]
|
||||
def test_높이는_입력_그대로_0_이하만_하한으로_폼에_되돌림(out) -> None:
|
||||
"""54-42 형태별 한도 삭제 · 54-51 높이 제약 풀기 — 하한은 그림이 서는 0.1 하나 · 토스트 없음."""
|
||||
assert out["filled"]["overrides"] == []
|
||||
assert extras(out["floor"]["updates"]) == [{"role": "extra0", "h": 0.1, "m": "콘크리트"}]
|
||||
assert out["floor"]["overrides"] == [{"soil_add_1_height": 0.1}]
|
||||
assert out["toasts"] == []
|
||||
|
||||
|
||||
def test_길이_전_후는_단별_구간값(out) -> None:
|
||||
|
||||
Reference in New Issue
Block a user