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).

!759

please include function bigint.
please include function str.

p {
  assertEquals("123", eval([[ "123" ]], (L) litlist()));
  
  // try calling unallowed function
  assertFail {
    eval([[ bigint("123") ]], (L) litlist());
  }
  
  // try calling allowed functions
  assertEquals("234",
    eval([[ str(bigint("234")) ]], litlist("str", "bigint")));
    
  // test evalWith
  assertEquals("y", evalWith("x", "x", "y"));
  
  print("OK");
}

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: 680 / 696
Referenced in: [show references]