mirror of
https://github.com/horizon-rust/horizon.git
synced 2026-11-07 02:56:17 -10:00
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.
21 lines
1011 B
Python
21 lines
1011 B
Python
import unittest
|
|
from tools import test_worldgen_random_parity as random
|
|
|
|
|
|
class WorldgenRandomCorpusTests(unittest.TestCase):
|
|
def test_wrapper_layers_overflow_seeds_and_fork_operations(self):
|
|
fixtures = list(random.corpus())
|
|
self.assertEqual(fixtures, list(random.corpus()))
|
|
self.assertEqual({f['legacy'] for f in fixtures}, {False, True})
|
|
self.assertEqual({f['layers'] for f in fixtures}, {1, 2, 3})
|
|
self.assertEqual({f['warmup'] for f in fixtures}, {0, 7})
|
|
operations = {op[0] for f in fixtures for op in f['ops']}
|
|
self.assertTrue({'decoration', 'feature', 'large', 'salt', 'slime', 'fork', 'pos', 'pos_seed', 'pos_hash', 'bits'} <= operations)
|
|
bits = {op[1] for f in fixtures for op in f['ops'] if op[0] == 'bits'}
|
|
self.assertTrue({-2147483648, 0, 32, 64, 2147483647} <= bits)
|
|
self.assertTrue(any(op[0] == 'feature' and op[3] == 214749 for f in fixtures for op in f['ops']))
|
|
|
|
|
|
if __name__ == '__main__':
|
|
unittest.main()
|