Conversation
Fix failing ExternalWalletDeeplinkStateErrorTest by replacing tryEmit() with suspending emit() on unbuffered MutableSharedFlow. Add ~117 new unit tests covering ShortVec, AgoraMemo, MessageHeader, AccountMeta, Instruction, program addresses, PublicKey, Key32, Mint, CachePolicyHandler, Loadable, and Result/List extensions. Signed-off-by: Brandon McAnsh <git@bmcreations.dev>
…nd utils - Base58: encode/decode roundtrips, leading zeros, checked encoding, invalid chars - DerivePath: path parsing, predefined paths, password handling - MnemonicPhrase: word count validation for 12/24 words - Extensions: byte array conversions, hex encoding, URL encode/decode, replaceParam
Covers canConsume, consume, prefix, suffix, chunk, byteToUnsignedInt, and ByteArray.toLong.
…nd utilities - Fiat: construction, arithmetic, comparison, rounding, currency conversion - VersionedMessageV0: encoding structure, determinism, size validation - CompiledInstruction: encode/fromList roundtrip, compile/decompile roundtrip - CurrencyCode: fractionDigits for all 8 special-cased currencies - Result extensions: filter and filterIsInstance - Double/String utils: roundTo, toLocaleAwareDoubleOrNull, padded - ProgramAddresses, SysVar, SodiumError, SwapMetadata
Covers LoginError, RegisterError, EmailVerificationError, PhoneVerificationError, PlacePoolBetError, and GetJwtError.
…nce, and userflags - FormatUtils: round, format, formatWholeRoundDown, formatCurrency - Number: abbreviated() K/M/B/T suffixes - AggregationType: LTTB downsample and Bucketed aggregation types - DeeplinkError: fromCode mapping and enum coverage - TokenTypeConverters: JSON roundtrips for SocialLinks, BillCustomizations, HolderMetrics - ResolvedFlag/FieldOverride: effectiveValue and override logic
These tests use Robolectric to handle android.util.Base64 and android.text.format.DateFormat dependencies that cannot run as pure JVM tests. - Base64ExtensionsTest: encode/decode roundtrips, URL-safe, base58 - SerializerTest: ByteList and PublicKey JSON serialization roundtrips - DateUtilsTest: date formatting and Instant conversion
…on tests - ActivityFeedMessageTest: MessageState.from() parsing with fallback and MessageMetadata.from() JSON deserialization - DeeplinkFragmentsTest: Uri.fragments extension for deeplink parsing (Robolectric for android.net.Uri) - InstantExtensionsTest: toLocalDate, atStartOfDay, atEndOfDay, format, formatLocalized
- ShortVecTest: encode/decode roundtrips, boundary values, encodeList - UInt16Test: little-endian encoding for 0, 255, 256, 65535 - MapsTest: getOrPutIfNonNull conditional insertion - LongTest: floored millisecond-to-second truncation - ByteArrayExtensionsTest: toPublicKey, toMint, toSignature, toHash
- MessageTest: encode/decode roundtrip, header construction from accounts, account sorting (signers before non-signers, writable before readonly), multiple instructions - ComputeBudgetProgramTest: SetComputeUnitPrice and SetComputeUnitLimit encode/decode roundtrips, encoding format validation
…tests - VirtualMachineProgramTest: TransferForSwap and CloseSwapAccountIfEmpty encoding, account counts, signer flags, command bytes - CurrencyCreatorProgramTest: BuyAndDepositIntoVm and SellAndDepositIntoVm encoding, account counts, U16 vmMemoryIndex encoding, command bytes
The native Ed25519 JNI library crashes during JVM test execution due to System.loadLibrary in the static initializer. This shadow class, backed by net.i2p.crypto:eddsa, provides identical Ed25519 operations (key gen, sign, verify, onCurve) without native dependencies. Modules opt in via srcDir pointing to testing/ed25519-shadow, which compiles the shadow into test classes (highest classpath priority).
Using the Ed25519 shadow, these tests cover previously-blocked crypto paths: transaction construction, signing, verification, encode/decode roundtrips, and all PDA derivation functions (associated accounts, VM accounts, deposit, timelock, swap, omnibus).
- CoinbaseOnRampEventHandler: 15 tests covering event routing (success, cancel, auto-click, all 4 error event types), unknown/invalid JSON - CoinbaseOnRampWebError: 3 tests for tryValueOf parsing - SubmitIntentError.typed(): 11 tests for proto→error mapping with reason string extraction from ErrorDetails - SwapError.typed(): 8 tests for proto→error mapping with deny/reason extraction
Consolidates the repeated test sourceSet + eddsa dependency into a single `flipcash.android.ed25519.shadow` convention plugin.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.