mirror of https://github.com/lukechilds/node.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
592 B
20 lines
592 B
8 years ago
|
'use strict';
|
||
|
const common = require('../../common');
|
||
|
const assert = require('assert');
|
||
|
|
||
|
// testing api calls for symbol
|
||
|
const test_symbol = require(`./build/${common.buildType}/test_symbol`);
|
||
|
|
||
|
assert.notStrictEqual(test_symbol.New(), test_symbol.New());
|
||
|
assert.notStrictEqual(test_symbol.New('foo'), test_symbol.New('foo'));
|
||
|
assert.notStrictEqual(test_symbol.New('foo'), test_symbol.New('bar'));
|
||
|
|
||
|
const foo1 = test_symbol.New('foo');
|
||
|
const foo2 = test_symbol.New('foo');
|
||
|
const object = {
|
||
|
[foo1]: 1,
|
||
|
[foo2]: 2,
|
||
|
};
|
||
|
assert.strictEqual(object[foo1], 1);
|
||
|
assert.strictEqual(object[foo2], 2);
|