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

11
LINES

< > BotCompany Repo | #1025038 // test_tok_findBeginningOfStatement

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

Libraryless. Click here for Pure Java version (2347L/15K).

1  
svoid test_tok_findBeginningOfStatement() {
2  
  LS tok = javaTok([[ if (!enabled) ret; ImageInfo info = latestWithAOA, ret if null;]]);
3  
  assertEqualsVerbose(7*2+1, tok_findBeginningOfStatement(tok, indexOf(tok, "null")));
4  
  
5  
  tok = javaTok([[ { LS s = x, ret if null;]]);
6  
  assertEqualsVerbose(1*2+1, tok_findBeginningOfStatement(tok, indexOf(tok, "ret")));
7  
  
8  
  tok = javaTok([[ imageSurfacePopupMenuWhenHighlighted_top(is, voidfunc(JPopupMenu menu, final Rect r) {
9  
    RecognizedText rec = findByField(lines, +r), ret if null;]]);
10  
  assertEqualsVerbose(get(tok, tok_findBeginningOfStatement(tok, indexOf(tok, "ret"))+2), "rec");
11  
}

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: #1025038
Snippet name: test_tok_findBeginningOfStatement
Eternal ID of this version: #1025038/7
Text MD5: 91537302611f1c67bd85db198ecd4e57
Transpilation MD5: 454d72d8076d8495c36783a81d3bac2e
Author: stefan
Category: javax / transpiling
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-09-01 20:58:13
Source code size: 642 bytes / 11 lines
Pitched / IR pitched: No / No
Views / Downloads: 230 / 331
Version history: 6 change(s)
Referenced in: [show references]