Lines Matching refs:test_reference
7 const test_reference = require(`./build/${buildType}/test_reference`); constant
12 assert.strictEqual(test_reference.finalizeCount, 0);
18 const symbol = test_reference.createSymbol('testSym');
19 test_reference.createReference(symbol, 0);
20 assert.strictEqual(test_reference.referenceValue, symbol);
22 test_reference.deleteReference();
25 const value = test_reference.createExternal();
26 assert.strictEqual(test_reference.finalizeCount, 0);
28 test_reference.checkExternal(value);
31 () => (test_reference.finalizeCount === 0));
34 const value = test_reference.createExternalWithFinalize();
35 assert.strictEqual(test_reference.finalizeCount, 0);
37 test_reference.checkExternal(value);
40 () => (test_reference.finalizeCount === 1));
43 const value = test_reference.createExternalWithFinalize();
44 assert.strictEqual(test_reference.finalizeCount, 0);
45 test_reference.createReference(value, 0);
46 assert.strictEqual(test_reference.referenceValue, value);
50 () => (test_reference.referenceValue === undefined &&
51 test_reference.finalizeCount === 1));
52 test_reference.deleteReference();
55 const value = test_reference.createExternalWithFinalize();
56 assert.strictEqual(test_reference.finalizeCount, 0);
57 test_reference.createReference(value, 1);
58 assert.strictEqual(test_reference.referenceValue, value);
62 () => (test_reference.finalizeCount === 0));
63 test_reference.deleteReference();
65 () => (test_reference.finalizeCount === 1));
68 const value = test_reference.createExternalWithFinalize();
69 assert.strictEqual(test_reference.finalizeCount, 0);
70 test_reference.createReference(value, 1);
74 () => (test_reference.finalizeCount === 0));
75 assert.strictEqual(test_reference.incrementRefcount(), 2);
79 () => (test_reference.finalizeCount === 0));
80 assert.strictEqual(test_reference.decrementRefcount(), 1);
84 () => (test_reference.finalizeCount === 0));
85 assert.strictEqual(test_reference.decrementRefcount(), 0);
89 () => (test_reference.finalizeCount === 1));
90 test_reference.deleteReference();
94 () => (test_reference.finalizeCount === 1));
120 test_reference.validateDeleteBeforeFinalize(wrapObject);