Compare commits
3 Commits
17a80da61f
...
7dbbab7dc0
Author | SHA1 | Date |
---|---|---|
Vitaliy Filippov | 7dbbab7dc0 | |
Vitaliy Filippov | a8ed6800c4 | |
Vitaliy Filippov | b84dc22ea2 |
|
@ -313,7 +313,7 @@ function murmur3(s)
|
|||
let hash = 0x12345678;
|
||||
for (let i = 0; i < s.length; i++)
|
||||
{
|
||||
hash ^= s[i].charCodeAt(i);
|
||||
hash ^= s.charCodeAt(i);
|
||||
hash = (hash*0x5bd1e995) & 0xFFFFFFFF;
|
||||
hash ^= (hash >> 15);
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
const { parse_level_indexes, parse_pg_dsl } = require('./dsl_pgs.js');
|
||||
const { random_custom_combinations, index_tree, parse_level_indexes, parse_pg_dsl } = require('./dsl_pgs.js');
|
||||
|
||||
function check(result, expected)
|
||||
{
|
||||
|
@ -92,4 +92,13 @@ check(
|
|||
]
|
||||
);
|
||||
|
||||
check(
|
||||
Object.keys(random_custom_combinations(index_tree([
|
||||
{ id: '1', size: 1, level: 'osd' },
|
||||
{ id: '2', size: 2, level: 'osd' },
|
||||
{ id: '3', size: 3, level: 'osd' }
|
||||
]), parse_level_indexes({ osd: '12' }), 10000)).sort(),
|
||||
[ 'pg_1_2', 'pg_1_3', 'pg_2_3' ]
|
||||
);
|
||||
|
||||
console.log('OK');
|
||||
|
|
Loading…
Reference in New Issue