Files
horizon-airdef/tests/test_carving_mask_parity.py
T
Ludovic Marie cb19660fbe Build Horizon Rust parity foundations and differential validation
Add version-bound core, world data, geometry, generation and feature implementations with native client/server comparison tools and scoped evidence reports. Apply Horizon project branding.

Workspace tests, Clippy and 147 Python tests passed. Full 51-family survival and expanded provider comparisons are still running; complete gameplay parity and a playable Rust client remain unfinished. Private game artifacts and the isolated simple-block placement work are excluded.
2026-10-06 11:24:51 +02:00

21 lines
926 B
Python

import unittest
from tools import test_carving_mask_parity as carving
class CarvingMaskCorpusTests(unittest.TestCase):
def test_sparse_dense_wrap_and_mutating_traversal_coverage(self):
fixtures = list(carving.corpus())
self.assertEqual(fixtures, list(carving.corpus()))
self.assertTrue(any(f['max'] - f['min'] + 1 == 4064 for f in fixtures))
self.assertTrue(any(f['min'] == -2**31 for f in fixtures))
self.assertTrue(any(f['max'] == 2**31 - 1 for f in fixtures))
ops = [op for f in fixtures for op in f['ops']]
self.assertEqual({op['kind'] for op in ops}, {'carve', 'fill', 'visit', 'read'})
self.assertTrue(any(op.get('fail') == 0 and op.get('add') for op in ops))
self.assertTrue(any(op.get('fail') == 63 for op in ops))
self.assertTrue(any(op.get('pos', [0])[0] == -2**31 for op in ops))
if __name__ == '__main__':
unittest.main()