feat(m02-df): 다른 로직 입력 받는 알약 예시값 자리

- CfLogicRef.examples(받는 알약 이름 → 값) · Eval 값 차례 = 이어진 선 > 넘긴 값 > 상자 예시값 > 그 로직 자기 예시값
- CfDesign.example — 변수 = variable.example · 다른 로직 = examples(없으면 null)
- 시험 23개

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VBToTCGk5dqDKeXCEP3vhk
This commit is contained in:
2026-10-01 19:52:55 +09:00
co-authored by Claude Opus 5.5
parent 9848bd01b9
commit dad45e997b
3 changed files with 38 additions and 3 deletions
+17
View File
@@ -592,3 +592,20 @@ def test_끝수_함수_출력_출력_상자() -> None:
"out([a, E.evalLogic(lg, V).cost.노무비]);"
)
assert got == [537000, 540000]
def test_다_다른_로직_받는_알약_예시값_차례() -> None:
got = _run(
LOGIC
+ "lg = M.updateBox(lg, other.id, { input: { ...lg.boxes[1].input, logic: { ...lg.boxes[1].input.logic, examples: { 계수: 10, 면적: 99 } } } });\n"
"const a = E.evalLogic(lg, {}, { logics: LOGICS }).cost.경비;\n"
"const b = E.evalLogic(lg, { [other.id]: { 계수: 2 } }, { logics: LOGICS }).cost.경비;\n"
"const noEx = M.updateBox(lg, other.id, { input: { ...lg.boxes[1].input, logic: { ...lg.boxes[1].input.logic, examples: undefined } } });\n"
"out([a, b, E.evalLogic(noEx, {}, { logics: LOGICS }).cost.경비,"
" M.designInputs(lg).map(d => [d.kind, d.port, d.example]), M.designInputs(noEx).map(d => d.example)]);"
)
a, b, c, designs, plain = got
# 면적 = 이어진 선(길이 7) > 예시값 99 · 계수 = 상자 예시값 10 · 넘긴 값 2 가 이김 · 없으면 그 로직 예시값 3
assert (a, b, c) == (70000, 14000, 21000)
assert designs == [["변수", "길이", 7], ["다른 로직", "계수", 10]]
assert plain == [7, None]