From 94085140436e84a31452516d8bf1f689ad4e5608 Mon Sep 17 00:00:00 2001 From: Chris Duncan Date: Wed, 4 Nov 2026 06:07:43 -0800 Subject: [PATCH] Fix import path in tests. --- test/arithmetic.mjs | 8 ++++---- test/mutants.mjs | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/test/arithmetic.mjs b/test/arithmetic.mjs index 3cbd336..bd2a726 100644 --- a/test/arithmetic.mjs +++ b/test/arithmetic.mjs @@ -165,13 +165,13 @@ export function verify_signature_ (): i32 { return verify_signature(U8W) ? 1 : 0 ` /** Seeded controls: each `from` must occur once inside its `fn`. */ -const NO_IDENTITY = [{ file: 'src/assembly/ed25519/ge.ts', fn: 'ge_double_scalarmult_vartime_to_p3', from: '\n\tp3_0(r)', to: '' }] -const STALE_T = [{ file: 'src/assembly/ed25519/ge.ts', fn: 'ge_double_scalarmult_vartime_to_p3', from: 'p1p1_to_p3(r, t)', to: 'p1p1_to_p3(r, t)\n\t\t\tfe_mul(r.T, r.X, r.Y)' }] +const NO_IDENTITY = [{ file: 'src/assembly/ed25519/ge/ge.ts', fn: 'ge_double_scalarmult_vartime_to_p3', from: '\n\tp3_0(r)', to: '' }] +const STALE_T = [{ file: 'src/assembly/ed25519/ge/ge.ts', fn: 'ge_double_scalarmult_vartime_to_p3', from: 'p1p1_to_p3(r, t)', to: 'p1p1_to_p3(r, t)\n\t\t\tfe_mul(r.T, r.X, r.Y)' }] const NO_PRECONDITIONS = [ { file: 'src/assembly/crypto_verify.ts', fn: 'verify_pubkey', from: 'if (ge_is_canonical(pub) != 0) {', to: 'if (false) {' }, { file: 'src/assembly/crypto_verify.ts', fn: 'verify_signature', from: 'if (ge_is_canonical(sig) != 0) {', to: 'if (false) {' }, - { file: 'src/assembly/ed25519/ge.ts', fn: 'ge_accept_small_order', from: 'return 0 - (malformed | (small_order ^ 1))', to: 'return 0 - (small_order ^ 1)' }, - { file: 'src/assembly/ed25519/ge.ts', fn: 'ge_reject_small_order', from: 'return 0 - (malformed | small_order)', to: 'return 0 - small_order' }, + { file: 'src/assembly/ed25519/ge/ge.ts', fn: 'ge_accept_small_order', from: 'return 0 - (malformed | (small_order ^ 1))', to: 'return 0 - (small_order ^ 1)' }, + { file: 'src/assembly/ed25519/ge/ge.ts', fn: 'ge_reject_small_order', from: 'return 0 - (malformed | small_order)', to: 'return 0 - small_order' }, ] /** Copies the sources, exports memory, adds the harness, applies any edits, and compiles. */ diff --git a/test/mutants.mjs b/test/mutants.mjs index 3a9a5e2..7acf3fb 100644 --- a/test/mutants.mjs +++ b/test/mutants.mjs @@ -27,7 +27,7 @@ const work = new URL('build/mutants/', root) const asc = new URL('node_modules/assemblyscript/bin/asc.js', root).pathname const EQUALBYTES = { fn: 'equalbytes', file: 'src/assembly/ed25519/utils.ts', codes: 'ERROR_EQUALBYTES_SELFTEST_' } -const GE_IS_CANONICAL = { fn: 'ge_is_canonical', file: 'src/assembly/ed25519/ge.ts', codes: 'ERROR_GE_IS_CANONICAL_SELFTEST_' } +const GE_IS_CANONICAL = { fn: 'ge_is_canonical', file: 'src/assembly/ed25519/ge/ge.ts', codes: 'ERROR_GE_IS_CANONICAL_SELFTEST_' } const FE_ISZERO = { fn: 'fe_iszero', file: 'src/assembly/ed25519/fe.ts', codes: 'ERROR_FE_ISZERO_SELFTEST_' } /** -- 2.52.0