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

10
LINES

< > BotCompany Repo | #1034157 // test_charIndexToCharInToken

JavaX fragment (include) [tags: use-pretranspiled]

Transpiled version (4986L) is out of date.

svoid test_charIndexToCharInToken() {
  LS tok = javaTok("hello world");
  assertEqualsVerbose(CharInToken(tok, 1, 0), charIndexToCharInToken(tok, 0));
  assertEqualsVerbose(CharInToken(tok, 1, 1), charIndexToCharInToken(tok, 1));
  assertEqualsVerbose(CharInToken(tok, 2, 0), charIndexToCharInToken(tok, 5));
  assertEqualsVerbose(CharInToken(tok, 3, 0), charIndexToCharInToken(tok, 6));
  
  tok = javaTok("add ");
  assertEqualsVerbose(CharInToken(tok, 3, 0), charIndexToCharInToken(tok, 4));
}

Author comment

Began life as a copy of #1034156

download  show line numbers  debug dex  old transpilations   

Travelled to 4 computer(s): bhatertpkbcr, ekrmjmnbrukm, mowyntqkapby, mqqgnosmbjvj

No comments. add comment

Snippet ID: #1034157
Snippet name: test_charIndexToCharInToken
Eternal ID of this version: #1034157/3
Text MD5: 52a937ba7d691ba6385eb339707e0758
Author: stefan
Category: javax / parsing
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2022-01-25 17:34:25
Source code size: 506 bytes / 10 lines
Pitched / IR pitched: No / No
Views / Downloads: 68 / 117
Version history: 2 change(s)
Referenced in: [show references]