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

14
LINES

< > BotCompany Repo | #1011693 - Test internPerProgram (OK)

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

Download Jar. Transpiled version (1739L) is out of date.

!7

p {
  S s1 = "a", s2 = lower("A");
  assertNotIdentical(s1, s2); // Now more clearly showing the improvement
  S a = internPerProgram(s1);
  S a2 = internPerProgram(s2);
  assertEquals("a", str(a));
  assertEquals("a", str(a2));
  assertIdentical(a, a2);
  S b = internPerProgram("b");
  assertEquals("b", str(b));
  print("OK");
}

Author comment

Began life as a copy of #1011691

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: #1011693
Snippet name: Test internPerProgram (OK)
Eternal ID of this version: #1011693/3
Text MD5: 3671611f6bc03fa6b09de0261194bc42
Author: stefan
Category: javax
Type: JavaX source code (desktop)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-11-02 06:24:26
Source code size: 348 bytes / 14 lines
Pitched / IR pitched: No / No
Views / Downloads: 275 / 337
Version history: 2 change(s)
Referenced in: [show references]