From 421d8246105daaf07c9fd6dc74761fee5c0bec46 Mon Sep 17 00:00:00 2001 From: Casey Rodarmor Date: Fri, 28 Oct 2022 14:15:36 -0700 Subject: [PATCH] More stuff --- src/subcommand/wallet/identify.rs | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/src/subcommand/wallet/identify.rs b/src/subcommand/wallet/identify.rs index 9a844e2032..a3f1ea3ea6 100644 --- a/src/subcommand/wallet/identify.rs +++ b/src/subcommand/wallet/identify.rs @@ -159,6 +159,15 @@ mod tests { // - two from different ranges // - tsv out of order // - ranges out of order + // - many large ranges with very large tsv + + #[test] + fn identify_from_tsv_none() { + assert_eq!( + identify_from_tsv(vec![(outpoint(1), vec![(0, 1)])], "1\n").unwrap(), + vec![] + ) + } #[test] fn identify_from_tsv_single() { @@ -169,10 +178,13 @@ mod tests { } #[test] - fn identify_from_tsv_none() { + fn identify_from_tsv_two_in_one_range() { assert_eq!( - identify_from_tsv(vec![(outpoint(1), vec![(0, 1)])], "1\n").unwrap(), - vec![] + identify_from_tsv(vec![(outpoint(1), vec![(0, 2)])], "0\n1\n").unwrap(), + vec![ + (outpoint(1), Ordinal(0), 0, "0"), + (outpoint(1), Ordinal(1), 0, "0"), + ] ) }