feat(abut): 날개벽 배근 입력 저장 (좌우 공통)
- AbutRecord.rebar.wing (바꾼 값만), applyWingRebar, 프로젝트 파일 검증 Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
06220fa312
commit
e6869d17be
4 files changed
+34
-1
No files matched your search
@@ -90,3 +90,21 @@ describe('교대 날개벽 배근 A1 좌 (AD7, 교대날개벽철근.md §11)',
|
||||
expect(bar(r, 'WR3')!.modified).toBe(true);
|
||||
});
|
||||
});
|
||||
|
||||
import { applyWingRebar } from '../src/core/abut/edit';
|
||||
import { checkStoredAbutments } from '../src/core/project';
|
||||
|
||||
describe('③ 날개벽 배근 입력 저장 (좌우 공통)', () => {
|
||||
it('stores only the changed values; undefined links a group back; refuses bad values', () => {
|
||||
const a = applyWingRebar(rec, { sHoriz: 150, delta: 30 });
|
||||
expect(a.rebar?.wing).toEqual({ sHoriz: 150, delta: 30 });
|
||||
expect(applyWingRebar(a, { sHoriz: undefined }).rebar?.wing).toEqual({ delta: 30 });
|
||||
expect(() => applyWingRebar(rec, { k20: 0 })).toThrow('WR20 배수');
|
||||
expect(() => applyWingRebar(rec, { sH: -1 })).toThrow();
|
||||
});
|
||||
|
||||
it('the project file keeps the 날개벽 input and refuses a non-number', () => {
|
||||
expect(() => checkStoredAbutments([applyWingRebar(rec, { c: 80 })])).not.toThrow();
|
||||
expect(() => checkStoredAbutments([{ ...rec, rebar: { wing: { c: 'x' } } as never }])).toThrow('날개벽 배근');
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user