diff --git a/js/packages/core/__tests__/__snapshots__/hashing.test.js.snap b/js/packages/core/__tests__/__snapshots__/hashing.test.js.snap index 99d03e4..316d59a 100644 --- a/js/packages/core/__tests__/__snapshots__/hashing.test.js.snap +++ b/js/packages/core/__tests__/__snapshots__/hashing.test.js.snap @@ -32,11 +32,6 @@ exports[`instruction set similarity without hash values 1`] = ` 5, "const", ], - [ - 0, - 6, - "const", - ], [ 2, 0, @@ -62,11 +57,6 @@ exports[`instruction set similarity without hash values 1`] = ` 4, 5, ], - [ - 2, - 4, - 6, - ], [ 3, 0, @@ -85,12 +75,6 @@ exports[`instruction set similarity without hash values 1`] = ` "value", 440, ], - [ - 3, - 6, - "value", - 0, - ], [ 4, [ @@ -203,52 +187,52 @@ exports[`instruction set similarity without hash values 2 1`] = ` [ 0, 19, - "const", + "exp", ], [ 0, 20, - "exp", + "mul", ], [ 0, 21, - "mul", + "div", ], [ 0, 22, - "div", + "const", ], [ 0, 23, - "const", + "mul", ], [ 0, 24, - "mul", + "div", ], [ 0, 25, - "div", + "sr", ], [ 0, 26, - "sr", + "add", ], [ 0, 27, - "add", + "const", ], [ 0, 28, - "const", + "mul", ], [ 0, @@ -258,22 +242,22 @@ exports[`instruction set similarity without hash values 2 1`] = ` [ 0, 30, - "mul", + "le", ], [ 0, 31, - "le", + "add", ], [ 0, 32, - "add", + "phasor", ], [ 0, 33, - "phasor", + "const", ], [ 0, @@ -283,7 +267,7 @@ exports[`instruction set similarity without hash values 2 1`] = ` [ 0, 35, - "const", + "mul", ], [ 0, @@ -293,27 +277,27 @@ exports[`instruction set similarity without hash values 2 1`] = ` [ 0, 37, - "mul", + "le", ], [ 0, 38, - "le", + "const", ], [ 0, 39, - "const", + "counter", ], [ 0, 40, - "counter", + "mul", ], [ 0, 41, - "mul", + "sub", ], [ 0, @@ -323,22 +307,22 @@ exports[`instruction set similarity without hash values 2 1`] = ` [ 0, 43, - "sub", + "const", ], [ 0, 44, - "const", + "sub", ], [ 0, 45, - "sub", + "add", ], [ 0, 46, - "add", + "mul", ], [ 0, @@ -348,12 +332,12 @@ exports[`instruction set similarity without hash values 2 1`] = ` [ 0, 48, - "mul", + "add", ], [ 0, 49, - "add", + "mul", ], [ 0, @@ -363,7 +347,7 @@ exports[`instruction set similarity without hash values 2 1`] = ` [ 0, 51, - "mul", + "const", ], [ 0, @@ -1078,12 +1062,12 @@ exports[`instruction set similarity without hash values 2 1`] = ` [ 2, 10, - 20, + 19, ], [ 2, 10, - 21, + 20, ], [ 2, @@ -1117,37 +1101,37 @@ exports[`instruction set similarity without hash values 2 1`] = ` ], [ 2, - 17, 19, + 21, ], [ 2, 20, - 22, + 44, ], [ 2, - 21, + 20, 45, ], [ 2, 21, - 46, + 22, ], [ 2, - 22, + 21, 23, ], [ 2, - 22, + 23, 24, ], [ 2, - 24, + 23, 25, ], [ @@ -1157,118 +1141,118 @@ exports[`instruction set similarity without hash values 2 1`] = ` ], [ 2, - 25, + 24, 27, ], [ 2, - 25, + 26, 28, ], [ 2, - 27, + 26, 29, ], [ 2, - 27, + 28, 30, ], [ 2, - 29, + 28, 31, ], [ 2, 29, - 32, + 42, ], [ 2, - 30, + 29, 43, ], [ 2, 30, - 44, + 32, ], [ 2, - 31, + 30, 33, ], [ 2, 31, - 34, + 35, ], [ 2, - 32, + 31, 36, ], [ 2, 32, - 37, + 34, ], [ 2, - 33, 35, + 37, ], [ 2, - 33, - 19, + 35, + 38, ], [ 2, 36, - 38, + 41, ], [ 2, 36, - 39, + 33, ], [ 2, 37, - 42, + 39, ], [ 2, 37, - 34, + 40, ], [ 2, - 38, - 40, + 39, + 30, ], [ 2, + 40, 38, - 41, ], [ 2, 40, - 31, + 25, ], [ 2, 41, - 39, + 5, ], [ 2, 41, - 26, + 37, ], [ 2, @@ -1278,32 +1262,32 @@ exports[`instruction set similarity without hash values 2 1`] = ` [ 2, 42, - 38, + 30, ], [ 2, - 43, + 44, 5, ], [ 2, - 43, - 31, + 44, + 19, ], [ 2, 45, - 5, + 46, ], [ 2, 45, - 20, + 47, ], [ 2, 46, - 47, + 30, ], [ 2, @@ -1313,52 +1297,42 @@ exports[`instruction set similarity without hash values 2 1`] = ` [ 2, 47, - 31, + 42, ], [ 2, 47, - 49, + 51, ], [ 2, 48, - 43, + 49, ], [ 2, 48, - 19, + 50, ], [ 2, 49, - 50, + 37, ], [ 2, 49, - 51, + 5, ], [ 2, 50, - 38, + 41, ], [ 2, 50, - 5, - ], - [ - 2, 51, - 42, - ], - [ - 2, - 51, - 19, ], [ 2, @@ -1455,11 +1429,6 @@ exports[`instruction set similarity without hash values 2 1`] = ` 61, 62, ], - [ - 2, - 61, - 19, - ], [ 2, 62, @@ -1473,12 +1442,12 @@ exports[`instruction set similarity without hash values 2 1`] = ` [ 2, 63, - 31, + 30, ], [ 2, 63, - 19, + 51, ], [ 2, @@ -1533,7 +1502,7 @@ exports[`instruction set similarity without hash values 2 1`] = ` [ 2, 69, - 26, + 25, ], [ 2, @@ -1698,18 +1667,13 @@ exports[`instruction set similarity without hash values 2 1`] = ` [ 2, 85, - 34, + 33, ], [ 2, 86, 87, ], - [ - 2, - 86, - 19, - ], [ 2, 87, @@ -1773,7 +1737,7 @@ exports[`instruction set similarity without hash values 2 1`] = ` [ 2, 93, - 26, + 25, ], [ 2, @@ -1943,7 +1907,7 @@ exports[`instruction set similarity without hash values 2 1`] = ` [ 2, 109, - 34, + 33, ], [ 2, @@ -2098,18 +2062,13 @@ exports[`instruction set similarity without hash values 2 1`] = ` [ 2, 124, - 34, + 33, ], [ 2, 125, 126, ], - [ - 2, - 125, - 19, - ], [ 2, 126, @@ -2173,7 +2132,7 @@ exports[`instruction set similarity without hash values 2 1`] = ` [ 2, 132, - 26, + 25, ], [ 2, @@ -2343,7 +2302,7 @@ exports[`instruction set similarity without hash values 2 1`] = ` [ 2, 148, - 34, + 33, ], [ 2, @@ -2475,11 +2434,6 @@ exports[`instruction set similarity without hash values 2 1`] = ` 161, 162, ], - [ - 2, - 161, - 19, - ], [ 2, 162, @@ -2543,7 +2497,7 @@ exports[`instruction set similarity without hash values 2 1`] = ` [ 2, 168, - 26, + 25, ], [ 2, @@ -2711,46 +2665,46 @@ exports[`instruction set similarity without hash values 2 1`] = ` ], [ 3, - 19, - "value", - 0, - ], - [ - 3, - 23, + 22, "value", -1, ], [ 3, - 28, + 27, "value", 6.91, ], [ 3, - 34, + 33, "value", 0.5, ], [ 3, - 35, + 34, "value", 4.8, ], [ 3, - 39, + 38, "value", 0.01, ], [ 3, - 44, + 43, "value", 0.4, ], + [ + 3, + 51, + "value", + 0, + ], [ 3, 60, diff --git a/js/packages/core/__tests__/lib.test.js b/js/packages/core/__tests__/lib.test.js index 785b355..dc1ff2f 100644 --- a/js/packages/core/__tests__/lib.test.js +++ b/js/packages/core/__tests__/lib.test.js @@ -6,7 +6,7 @@ import { test('errors on graph construction', function() { expect(() => { // Missing second argument, should throw - let p = el.phasor(1); + let p = el.seq({}, 1); }).toThrow(); expect(() => {