From 0b2330aee6a63f7833cf58499520c308efea6032 Mon Sep 17 00:00:00 2001 From: umsangdon Date: Sat, 31 Oct 2026 15:41:17 +0900 Subject: [PATCH] =?UTF-8?q?fix(B09=20=EB=8B=A8=EA=B0=80=20=EB=8D=AE?= =?UTF-8?q?=EA=B0=9C):=20TS=20=EC=9D=B4=EB=A6=84=20=EA=B2=B9=EC=B9=A8(PART?= =?UTF-8?q?S=20=E2=86=92=20COVER=5FPARTS)=20=C2=B7=20=EB=82=B4=EC=97=AD=20?= =?UTF-8?q?=EA=B1=B0=EC=9A=B8=20=EC=8B=9C=ED=97=98=20=EA=B8=80=EC=9D=84=20?= =?UTF-8?q?stdin=20=EC=9C=BC=EB=A1=9C=20(PLAN=20707-3)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit test_145_3 블록 나누기 시험 — Calc_Base.ts 가 길어져 node -e 명령 줄이 Windows 32 K 를 넘음 · 같은 글을 stdin 으로 넘김(판정 그대로). Co-Authored-By: Claude Opus 5.5 --- B09_Estimation/B09_Estimation_Calc_Base.ts | 8 ++++---- resources/tester/test_145_3_b09_bill.py | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/B09_Estimation/B09_Estimation_Calc_Base.ts b/B09_Estimation/B09_Estimation_Calc_Base.ts index d2e77ad7d..011b21db0 100644 --- a/B09_Estimation/B09_Estimation_Calc_Base.ts +++ b/B09_Estimation/B09_Estimation_Calc_Base.ts @@ -44,7 +44,7 @@ export const SOURCES = [ /** 자재 줄 사용자 표시 */ export const SUPPLY = ["관급", "별도"] as const; -const PARTS = ["labor", "material", "expense"] as const; +const COVER_PARTS = ["labor", "material", "expense"] as const; function scaled(value: number, places: number, fn: (x: number) => number): number { const a = Math.abs(value); @@ -121,8 +121,8 @@ export function machineCover(cover: unknown): Row { const out: Row = {}; for (const [key, cell] of Object.entries(cover && typeof cover === "object" ? cover : {})) { const got: Row = {}; - for (const p of PARTS) got[p] = cell && typeof cell === "object" ? num(cell[p]) : null; - if (PARTS.every((p) => got[p] !== null)) out[key] = got; + for (const p of COVER_PARTS) got[p] = cell && typeof cell === "object" ? num(cell[p]) : null; + if (COVER_PARTS.every((p) => got[p] !== null)) out[key] = got; } return out; } @@ -310,7 +310,7 @@ export function computeBase(inputs: Row, user: Row): Row { if (!(b.key in covers)) continue; // 707-3 덮개 = 비목 합 · 합(줄은 그대로) b.book = { labor: b.labor, material: b.material, expense: b.expense, sum: b.sum }; Object.assign(b, covers[b.key], { covered: true }); - b.sum = total(PARTS.map((p) => b[p])); + b.sum = total(COVER_PARTS.map((p) => b[p])); } gaps = gaps.filter((g) => !(g.tab === "machine_blocks" && g.key in covers)); const machine = blocks.map((b: Row, i: number) => ({ diff --git a/resources/tester/test_145_3_b09_bill.py b/resources/tester/test_145_3_b09_bill.py index f18b74948..e853a191a 100644 --- a/resources/tester/test_145_3_b09_bill.py +++ b/resources/tester/test_145_3_b09_bill.py @@ -248,8 +248,8 @@ def test_거울_블록_나누기(): ) result = subprocess.run( ["node", "--experimental-strip-types", "--no-warnings", - "--input-type=module-typescript", "-e", calc + body], - capture_output=True, text=True, encoding="utf-8", timeout=60, + "--input-type=module-typescript"], # 글은 stdin — 명령 줄 32 K 넘김(Windows) + input=calc + body, capture_output=True, text=True, encoding="utf-8", timeout=60, ) # fmt: skip assert result.returncode == 0, result.stderr assert json.loads(result.stdout) == compute_estimation(SPLIT_INPUTS, USER, DAEGA.get)