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

40
LINES

< > BotCompany Repo | #1001542 // Indent Java Test Case Bot - developing

JavaX source code - run with: x30.jar

!747

m {
  // These must be correctly indented.
  static S snippets = "#1001541 #1001437 #629 #1000985 #1001519";
  
  static new L<TestCase> cases;
  
  static class TestCase {
    S name, input, output;
    
    *() {}
    *(S *name, S *input, S *output) {}
  }
  
  p {
    L<S> lSnippets = codeTokensOnly(javaTokPlusPeriod(snippets));
    for (S snippetID : lSnippets) {
      L<S> text = toLines(loadSnippet(snippetID)); // TODO: better to load with wayback machine in case they change (Oct 23 2015, 19:57)
      L<S> withoutIndent = removeIndent(text);
      cases.add(new TestCase(snippetID, fromLines(withoutIndent), fromLines(text)));
    }
    
    makeAndroid3("Indent Java Test Case Bot.");
  }
  
  static synchronized S answer(S s) {
    new Matches m;
    if (match3("solution * for case * by *", m)) {
      // TODO
    }
  }
  
  static L<S> removeIndent(L<S> text) {
    new L<S> l;
    for (S line : text)
      l.add(ltrim(line));
    ret l;
  }
}

download  show line numbers  debug dex  old transpilations   

Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1001542
Snippet name: Indent Java Test Case Bot - developing
Eternal ID of this version: #1001542/1
Text MD5: 0fb5ca727a202f7e032f2386742570d0
Author: stefan
Category:
Type: JavaX source code
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2015-10-23 20:06:36
Source code size: 1007 bytes / 40 lines
Pitched / IR pitched: No / Yes
Views / Downloads: 671 / 610
Referenced in: [show references]