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

8
LINES

< > BotCompany Repo | #1031539 // test_memLimit

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

Libraryless. Click here for Pure Java version (3035L/18K).

svoid test_memLimit() {
  assertEqualsVerbose("hello", memLimit(megabytes(10), () -> "hello"));
  assertFailVerbose(r { memLimit(megabytes(10), () -> {
    int[] bla = new int[10000000];
    ping();
    ret bla;
  }); });
}

download  show line numbers  debug dex  old transpilations   

Travelled to 4 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, vouqrxazstgt

No comments. add comment

Snippet ID: #1031539
Snippet name: test_memLimit
Eternal ID of this version: #1031539/1
Text MD5: 69e44771b4dc9fcf7c8a55bd67127df2
Transpilation MD5: f97a4e7baac8cdeb67f21150a6ea2670
Author: stefan
Category: javax / sandboxing
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2021-06-20 05:05:27
Source code size: 230 bytes / 8 lines
Pitched / IR pitched: No / No
Views / Downloads: 137 / 194
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)