Skip to content

Commit 1540dcc

Browse files
committed
add tests for builtins
1 parent d77bff0 commit 1540dcc

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

test.js

+10-1
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,15 @@ it('numbers', function () {
7272
}
7373
});
7474

75-
it('identifier with dollar sign and digit', function () {
75+
it('identifier with dollar sign', function () {
7676
assert.deepEqual(getTokens('id$1'), [['none', 'id$1']]);
77+
assert.deepEqual(getTokens('id$tx'), [['none', 'id$tx']]);
78+
});
79+
80+
it('builtins', function () {
81+
const builtins = ['msg', 'block', 'tx', 'abi'];
82+
83+
for (const b of builtins) {
84+
assert.deepEqual(getTokens(b), [['built_in', b]]);
85+
}
7786
});

0 commit comments

Comments
 (0)