Compare commits
3 Commits
7dbbab7dc0
...
17a80da61f
Author | SHA1 | Date |
---|---|---|
Vitaliy Filippov | 17a80da61f | |
Vitaliy Filippov | 8972451690 | |
Vitaliy Filippov | f4bfd2e64b |
|
@ -313,7 +313,7 @@ function murmur3(s)
|
|||
let hash = 0x12345678;
|
||||
for (let i = 0; i < s.length; i++)
|
||||
{
|
||||
hash ^= s.charCodeAt(i);
|
||||
hash ^= s[i].charCodeAt(i);
|
||||
hash = (hash*0x5bd1e995) & 0xFFFFFFFF;
|
||||
hash ^= (hash >> 15);
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
const { random_custom_combinations, index_tree, parse_level_indexes, parse_pg_dsl } = require('./dsl_pgs.js');
|
||||
const { parse_level_indexes, parse_pg_dsl } = require('./dsl_pgs.js');
|
||||
|
||||
function check(result, expected)
|
||||
{
|
||||
|
@ -92,13 +92,4 @@ 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