feat: implement directional alignment predicate evaluators (no more NYI)
- Replace makeNotImplementedPredicate stubs for leftAlignedWith, rightAlignedWith, topAlignedWith, bottomAlignedWith with real evaluators delegating to alignedWithPredicate with axis option - Update logic-engine.test.ts to expect real evaluation results instead of IMH_FEATURE_NOT_YET_IMPLEMENTED
This commit is contained in:
@@ -361,7 +361,7 @@ describe('predicate calls', () => {
|
||||
assert.ok(!result.diagnostics.some((d) => d.code === 'IMH_FEATURE_NOT_YET_IMPLEMENTED'));
|
||||
});
|
||||
|
||||
it('returns not-yet-implemented for aligned-with variants', () => {
|
||||
it('evaluates aligned-with directional variants correctly', () => {
|
||||
const world = makeWorld();
|
||||
const variants = ['leftAlignedWith', 'rightAlignedWith', 'topAlignedWith', 'bottomAlignedWith'];
|
||||
for (const variant of variants) {
|
||||
@@ -391,11 +391,12 @@ describe('predicate calls', () => {
|
||||
};
|
||||
|
||||
const result = evaluateLogic(input);
|
||||
assert.strictEqual(result.passed, false, `Expected ${variant} to fail`);
|
||||
assert.ok(
|
||||
result.diagnostics.some((d) => d.code === 'IMH_FEATURE_NOT_YET_IMPLEMENTED'),
|
||||
`Expected ${variant} to produce IMH_FEATURE_NOT_YET_IMPLEMENTED`
|
||||
);
|
||||
// Elements 1 (0,0,100,40) and 2 (110,50,210,90) are not aligned
|
||||
// on any side, so all directional alignments should produce determinate
|
||||
// false results (not IMH_FEATURE_NOT_YET_IMPLEMENTED).
|
||||
assert.strictEqual(result.passed, false, `Expected ${variant} to evaluate, not return NYI`);
|
||||
assert.strictEqual(result.formulaResults.length, 1);
|
||||
assert.strictEqual(result.formulaResults[0].outcome, 'fail');
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user