mirror of
https://github.com/demostf/demo.js
synced 2026-06-04 00:54:14 +02:00
use map for setconvar
This commit is contained in:
parent
384d4557f6
commit
b3e69f1af4
3 changed files with 16 additions and 15 deletions
|
|
@ -6,20 +6,20 @@ suite('SetConVar', () => {
|
|||
test('Parse setConVar', () => {
|
||||
assertParser(ParseSetConVar, getStream(String.fromCharCode(2) + 'foo\0bar\0second\0value\0'), {
|
||||
packetType: 'setConVar',
|
||||
vars: {
|
||||
foo: 'bar',
|
||||
second: 'value'
|
||||
}
|
||||
vars: new Map([
|
||||
['foo', 'bar'],
|
||||
['second', 'value']
|
||||
])
|
||||
}, 8 + ('foo\0bar\0second\0value\0'.length * 8));
|
||||
});
|
||||
|
||||
test('Encode setConVar', () => {
|
||||
assertEncoder(ParseSetConVar, EncodeSetConVar, {
|
||||
packetType: 'setConVar',
|
||||
vars: {
|
||||
foo: 'bar',
|
||||
second: 'value'
|
||||
}
|
||||
vars: new Map([
|
||||
['foo', 'bar'],
|
||||
['second', 'value']
|
||||
])
|
||||
}, 8 + ('foo\0bar\0second\0value\0'.length * 8));
|
||||
});
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue