TEST(select_outputs, order) { tools::wallet2 w; // check that most unrelated heights are picked in order tools::wallet2::transfer_container transfers = make_transfers_container(5); transfers[0].m_block_height = 700; transfers[1].m_block_height = 700; transfers[2].m_block_height = 704; transfers[3].m_block_height = 716; transfers[4].m_block_height = 701; std::vector<size_t> unused_indices({0, 1, 2, 3, 4}); std::vector<size_t> selected; SELECT(0); PICK(3); // first the one that's far away PICK(2); // then the one that's close PICK(4); // then the one that's adjacent PICK(1); // then the one that's on the same height }
TEST(select_outputs, one_out_of_N) { tools::wallet2 w; // check that if there are N-1 outputs of the same height, one of them // already selected, the next one selected is the one that's from a // different height tools::wallet2::transfer_container transfers = make_transfers_container(10); transfers[6].m_block_height = 700; std::vector<size_t> unused_indices({0, 1, 2, 3, 4, 5, 6, 7, 8, 9}); std::vector<size_t> selected; SELECT(2); PICK(6); }
/* ^@ */ MARKVERT_ABBREV, /* ^a */ MOVESOL_ABBREV, /* ^b */ MARK_ABBREV, /* ^c */ COPY_ABBREV, /* ^d */ NEWDOC_ABBREV, /* ^e */ MOVEEOL_ABBREV, /* ^f */ FIND_ABBREV, /* ^g */ REPEATLAST_ABBREV, /* ^h */ BACKSPACE_ABBREV, /* ^i */ NULL, /* ^j */ GOTOLINE_ABBREV, /* ^k */ EXEC_ABBREV, /* ^l */ REFRESH_ABBREV, /* ^m */ NULL, /* ^n */ PICK(NEXTPAGE_ABBREV, PAGEDOWN_ABBREV), /* ^o */ OPEN_ABBREV, /* ^p */ PICK(PREVPAGE_ABBREV, PAGEUP_ABBREV), /* ^q */ CLOSEDOC_ABBREV, /* ^r */ REPLACE_ABBREV, /* ^s */ SAVE_ABBREV, /* ^t */ RECORD_ABBREV, /* ^u */ UNDELLINE_ABBREV, /* ^v */ PASTE_ABBREV, /* ^w */ PASTEVERT_ABBREV, /* ^x */ CUT_ABBREV, /* ^y */ DELETELINE_ABBREV, /* ^z */ SUSPEND_ABBREV, /* ^[ */ ESCAPE_ABBREV,
xbee_O_PICK(void) { PICK(); }