Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

18
LINES

< > BotCompany Repo | #1025483 // test_replaceSublist (OK)

JavaX fragment (include)

svoid test_replaceSublist() {
  // insert shorter list
  
  L l = ll("a", "x", "z");
  replaceSublist(l, 1, 2, ll("b", "c"));
  assertEqualsVerbose(l, ll("a", "b", "c", "z"));
  
  // insert longer list
  
  l = ll("a", "x", "y", "z");
  replaceSublist(l, 1, 3, ll("b"));
  assertEqualsVerbose(l, ll("a", "b", "z"));
  
  // insert same-size list
  l = ll("a", "x", "y", "z");
  replaceSublist(l, 2, 3, ll("x"));
  assertEqualsVerbose(l, ll("a", "x", "x", "z"));
}

download  show line numbers  debug dex  old transpilations   

Travelled to 6 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1025483
Snippet name: test_replaceSublist (OK)
Eternal ID of this version: #1025483/6
Text MD5: 14514709765346f949d2169dbe8cf5ab
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-09-30 22:16:45
Source code size: 481 bytes / 18 lines
Pitched / IR pitched: No / No
Views / Downloads: 193 / 237
Version history: 5 change(s)
Referenced in: [show references]