Files
Pier_v1/tests/dms.test.ts
T
ypshimandClaude Haiku 5.5 d963d8ed3c feat(core): parse P1 workbook and build T-type pier shape
- parse Excel input by header strings (pier, IP, bearing tables)
- DMS azimuth parser (E03), input validation (E01, E02)
- pure geometry: axis, bearings, stepped coping, column, footing, piles, blinding
- warnings W01, W02, W05, W07, I01
- regression tests against spec.md section 12 (P1)

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
2026-10-21 17:26:16 +09:00

14 lines
436 B
TypeScript

import { describe, expect, it } from 'vitest';
import { parseDms } from '../src/core/dms';
describe('parseDms', () => {
it('converts the P1 sheet string to decimal degrees (spec §12: 75.9489°)', () => {
expect(parseDms(` 75°56'55.9"`)).toBeCloseTo(75.9489, 4);
});
it('returns null for malformed strings (E03)', () => {
expect(parseDms('75.9489')).toBeNull();
expect(parseDms(`75°61'00"`)).toBeNull();
});
});