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

22
LINES

< > BotCompany Repo | #1002396 // Eval Self Test

JavaX source code [tags: use-pretranspiled] - run with: x30.jar

Libraryless. Compilation Failed (1066L/8K).

1  
!759
2  
3  
please include function bigint.
4  
please include function str.
5  
6  
p {
7  
  assertEquals("123", eval([[ "123" ]], (L) litlist()));
8  
  
9  
  // try calling unallowed function
10  
  assertFail {
11  
    eval([[ bigint("123") ]], (L) litlist());
12  
  }
13  
  
14  
  // try calling allowed functions
15  
  assertEquals("234",
16  
    eval([[ str(bigint("234")) ]], litlist("str", "bigint")));
17  
    
18  
  // test evalWith
19  
  assertEquals("y", evalWith("x", "x", "y"));
20  
  
21  
  print("OK");
22  
}

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1002396
Snippet name: Eval Self Test
Eternal ID of this version: #1002396/1
Text MD5: 68e98fddfe18f7f8ba92f42e2aa61026
Transpilation MD5: da5c74452e8de0a884d4db2d0e7f5505
Author: stefan
Category: javax
Type: JavaX source code
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2016-01-19 02:11:48
Source code size: 466 bytes / 22 lines
Pitched / IR pitched: No / No
Views / Downloads: 681 / 698
Referenced in: [show references]