• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1'use strict';
2const common = require('../../common');
3const assert = require('assert');
4
5// Testing api calls for symbol
6const test_symbol = require(`./build/${common.buildType}/test_symbol`);
7
8assert.notStrictEqual(test_symbol.New(), test_symbol.New());
9assert.notStrictEqual(test_symbol.New('foo'), test_symbol.New('foo'));
10assert.notStrictEqual(test_symbol.New('foo'), test_symbol.New('bar'));
11
12const foo1 = test_symbol.New('foo');
13const foo2 = test_symbol.New('foo');
14const object = {
15  [foo1]: 1,
16  [foo2]: 2,
17};
18assert.strictEqual(object[foo1], 1);
19assert.strictEqual(object[foo2], 2);
20