From 77673663cad4ddca4a921df8a32d008fa7f37869 Mon Sep 17 00:00:00 2001 From: Mayukha Vadari Date: Tue, 10 Feb 2026 17:42:41 -0500 Subject: [PATCH] fix cspell issues in tests (#6348) --- cspell.config.yaml | 3 + src/test/app/Wasm_test.cpp | 6 +- .../wasm_fixtures/codecov_tests/src/lib.rs | 56 +++++++++---------- src/test/app/wasm_fixtures/copyFixtures.py | 1 + 4 files changed, 35 insertions(+), 31 deletions(-) diff --git a/cspell.config.yaml b/cspell.config.yaml index a4f5e52cf8..d03eda58f9 100644 --- a/cspell.config.yaml +++ b/cspell.config.yaml @@ -6,6 +6,8 @@ ignorePaths: - docs/**/*.puml - cmake/** - LICENSE.md + - src/test/app/wasm_fixtures/**/*.wat + - src/test/app/wasm_fixtures/*.c language: en allowCompoundWords: true # TODO (#6334) ignoreRandomStrings: true @@ -59,6 +61,7 @@ words: - Britto - Btrfs - canonicality + - cdylib - changespq - checkme - choco diff --git a/src/test/app/Wasm_test.cpp b/src/test/app/Wasm_test.cpp index c4ca26250c..1802cd9d44 100644 --- a/src/test/app/Wasm_test.cpp +++ b/src/test/app/Wasm_test.cpp @@ -229,8 +229,8 @@ struct Wasm_test : public beast::unit_test::suite Bytes outb; outb.resize(1024); - auto const minsz = std::min(static_cast(512), static_cast(b58WasmHex.size())); - auto const s = std::string_view(b58WasmHex.c_str(), minsz); + auto const minSize = std::min(static_cast(512), static_cast(b58WasmHex.size())); + auto const s = std::string_view(b58WasmHex.c_str(), minSize); auto const re = engine.run(b58Wasm, "b58enco", wasmParams(outb, s)); @@ -802,7 +802,7 @@ struct Wasm_test : public beast::unit_test::suite std::shared_ptr hfs(new TestHostFunctions(env, 0)); auto imports = createWasmImport(*hfs); - { // Calls float_from_uint with bad aligment. + { // Calls float_from_uint with bad alignment. // Can be checked through codecov auto& engine = WasmEngine::instance(); diff --git a/src/test/app/wasm_fixtures/codecov_tests/src/lib.rs b/src/test/app/wasm_fixtures/codecov_tests/src/lib.rs index 5e58d13ecd..59ff5bc164 100644 --- a/src/test/app/wasm_fixtures/codecov_tests/src/lib.rs +++ b/src/test/app/wasm_fixtures/codecov_tests/src/lib.rs @@ -564,13 +564,13 @@ pub extern "C" fn finish() -> i32 { "amm_keylet_len_wrong_non_xrp_currency_len", ) }); - let xrpissue: &[u8] = &[0; 40]; // 40 bytes + let xrp_issue: &[u8] = &[0; 40]; // 40 bytes with_buffer::<32, _, _>(|ptr, len| { check_result( unsafe { host::amm_keylet( - xrpissue.as_ptr(), - xrpissue.len(), + xrp_issue.as_ptr(), + xrp_issue.len(), asset1_bytes.as_ptr(), asset1_bytes.len(), ptr, @@ -1265,7 +1265,7 @@ pub extern "C" fn finish() -> i32 { check_result( unsafe { host::account_keylet(locator.as_ptr(), locator.len(), ptr, len) }, error_codes::INVALID_PARAMS, - "account_keylet_wrong_size_accountid", + "account_keylet_wrong_size_account_id", ) }); let seq: i32 = 1; @@ -1283,7 +1283,7 @@ pub extern "C" fn finish() -> i32 { ) }, error_codes::INVALID_PARAMS, - "check_keylet_wrong_size_accountid", + "check_keylet_wrong_size_account_id", ) }); with_buffer::<2, _, _>(|ptr, len| { @@ -1301,7 +1301,7 @@ pub extern "C" fn finish() -> i32 { ) }, error_codes::INVALID_PARAMS, - "credential_keylet_wrong_size_accountid1", + "credential_keylet_wrong_size_account_id1", ) }); with_buffer::<2, _, _>(|ptr, len| { @@ -1319,7 +1319,7 @@ pub extern "C" fn finish() -> i32 { ) }, error_codes::INVALID_PARAMS, - "credential_keylet_wrong_size_accountid2", + "credential_keylet_wrong_size_account_id2", ) }); with_buffer::<2, _, _>(|ptr, len| { @@ -1335,7 +1335,7 @@ pub extern "C" fn finish() -> i32 { ) }, error_codes::INVALID_PARAMS, - "delegate_keylet_wrong_size_accountid1", + "delegate_keylet_wrong_size_account_id1", ) }); with_buffer::<2, _, _>(|ptr, len| { @@ -1351,7 +1351,7 @@ pub extern "C" fn finish() -> i32 { ) }, error_codes::INVALID_PARAMS, - "delegate_keylet_wrong_size_accountid2", + "delegate_keylet_wrong_size_account_id2", ) }); with_buffer::<2, _, _>(|ptr, len| { @@ -1367,7 +1367,7 @@ pub extern "C" fn finish() -> i32 { ) }, error_codes::INVALID_PARAMS, - "deposit_preauth_keylet_wrong_size_accountid1", + "deposit_preauth_keylet_wrong_size_account_id1", ) }); with_buffer::<2, _, _>(|ptr, len| { @@ -1383,14 +1383,14 @@ pub extern "C" fn finish() -> i32 { ) }, error_codes::INVALID_PARAMS, - "deposit_preauth_keylet_wrong_size_accountid2", + "deposit_preauth_keylet_wrong_size_account_id2", ) }); with_buffer::<2, _, _>(|ptr, len| { check_result( unsafe { host::did_keylet(locator.as_ptr(), locator.len(), ptr, len) }, error_codes::INVALID_PARAMS, - "did_keylet_wrong_size_accountid", + "did_keylet_wrong_size_account_id", ) }); with_buffer::<2, _, _>(|ptr, len| { @@ -1406,7 +1406,7 @@ pub extern "C" fn finish() -> i32 { ) }, error_codes::INVALID_PARAMS, - "escrow_keylet_wrong_size_accountid", + "escrow_keylet_wrong_size_account_id", ) }); with_buffer::<2, _, _>(|ptr, len| { @@ -1424,7 +1424,7 @@ pub extern "C" fn finish() -> i32 { ) }, error_codes::INVALID_PARAMS, - "line_keylet_wrong_size_accountid1", + "line_keylet_wrong_size_account_id1", ) }); with_buffer::<2, _, _>(|ptr, len| { @@ -1442,7 +1442,7 @@ pub extern "C" fn finish() -> i32 { ) }, error_codes::INVALID_PARAMS, - "line_keylet_wrong_size_accountid2", + "line_keylet_wrong_size_account_id2", ) }); with_buffer::<2, _, _>(|ptr, len| { @@ -1458,7 +1458,7 @@ pub extern "C" fn finish() -> i32 { ) }, error_codes::INVALID_PARAMS, - "mpt_issuance_keylet_wrong_size_accountid", + "mpt_issuance_keylet_wrong_size_account_id", ) }); with_buffer::<2, _, _>(|ptr, len| { @@ -1474,7 +1474,7 @@ pub extern "C" fn finish() -> i32 { ) }, error_codes::INVALID_PARAMS, - "mptoken_keylet_wrong_size_accountid", + "mptoken_keylet_wrong_size_account_id", ) }); with_buffer::<2, _, _>(|ptr, len| { @@ -1490,7 +1490,7 @@ pub extern "C" fn finish() -> i32 { ) }, error_codes::INVALID_PARAMS, - "nft_offer_keylet_wrong_size_accountid", + "nft_offer_keylet_wrong_size_account_id", ) }); with_buffer::<2, _, _>(|ptr, len| { @@ -1506,7 +1506,7 @@ pub extern "C" fn finish() -> i32 { ) }, error_codes::INVALID_PARAMS, - "offer_keylet_wrong_size_accountid", + "offer_keylet_wrong_size_account_id", ) }); with_buffer::<2, _, _>(|ptr, len| { @@ -1522,7 +1522,7 @@ pub extern "C" fn finish() -> i32 { ) }, error_codes::INVALID_PARAMS, - "oracle_keylet_wrong_size_accountid", + "oracle_keylet_wrong_size_account_id", ) }); with_buffer::<2, _, _>(|ptr, len| { @@ -1540,7 +1540,7 @@ pub extern "C" fn finish() -> i32 { ) }, error_codes::INVALID_PARAMS, - "paychan_keylet_wrong_size_accountid1", + "paychan_keylet_wrong_size_account_id1", ) }); with_buffer::<2, _, _>(|ptr, len| { @@ -1558,7 +1558,7 @@ pub extern "C" fn finish() -> i32 { ) }, error_codes::INVALID_PARAMS, - "paychan_keylet_wrong_size_accountid2", + "paychan_keylet_wrong_size_account_id2", ) }); with_buffer::<2, _, _>(|ptr, len| { @@ -1574,14 +1574,14 @@ pub extern "C" fn finish() -> i32 { ) }, error_codes::INVALID_PARAMS, - "permissioned_domain_keylet_wrong_size_accountid", + "permissioned_domain_keylet_wrong_size_account_id", ) }); with_buffer::<2, _, _>(|ptr, len| { check_result( unsafe { host::signers_keylet(locator.as_ptr(), locator.len(), ptr, len) }, error_codes::INVALID_PARAMS, - "signers_keylet_wrong_size_accountid", + "signers_keylet_wrong_size_account_id", ) }); with_buffer::<2, _, _>(|ptr, len| { @@ -1597,7 +1597,7 @@ pub extern "C" fn finish() -> i32 { ) }, error_codes::INVALID_PARAMS, - "ticket_keylet_wrong_size_accountid", + "ticket_keylet_wrong_size_account_id", ) }); with_buffer::<2, _, _>(|ptr, len| { @@ -1613,7 +1613,7 @@ pub extern "C" fn finish() -> i32 { ) }, error_codes::INVALID_PARAMS, - "vault_keylet_wrong_size_accountid", + "vault_keylet_wrong_size_account_id", ) }); let uint256: &[u8] = b"00000000000000000000000000000001"; @@ -1630,7 +1630,7 @@ pub extern "C" fn finish() -> i32 { ) }, error_codes::INVALID_PARAMS, - "get_nft_wrong_size_accountid", + "get_nft_wrong_size_account_id", ) }); check_result( @@ -1643,7 +1643,7 @@ pub extern "C" fn finish() -> i32 { ) }, error_codes::INVALID_PARAMS, - "trace_account_wrong_size_accountid", + "trace_account_wrong_size_account_id", ); // invalid Currency was already tested above diff --git a/src/test/app/wasm_fixtures/copyFixtures.py b/src/test/app/wasm_fixtures/copyFixtures.py index 2c0abc560d..3d9faddbed 100644 --- a/src/test/app/wasm_fixtures/copyFixtures.py +++ b/src/test/app/wasm_fixtures/copyFixtures.py @@ -1,3 +1,4 @@ +# cspell: disable import os import sys import subprocess