Download Jar. Libraryless. Click here for Pure Java version (11697L/65K).
1 | !7 |
2 | |
3 | p { |
4 | S s1 = "a", s2 = lower("A"); |
5 | assertNotIdentical(s1, s2); // Now more clearly showing the improvement |
6 | S a = internPerProgram(s1); |
7 | S a2 = internPerProgram(s2); |
8 | assertEquals("a", str(a)); |
9 | assertEquals("a", str(a2)); |
10 | assertIdentical(a, a2); |
11 | S b = internPerProgram("b"); |
12 | assertEquals("b", str(b)); |
13 | print("OK"); |
14 | } |
Began life as a copy of #1011691
download show line numbers debug dex old transpilations
Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gjtlkbvenryc, 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 |
Transpilation MD5: | 5fa50c01a9cb6cd762f47aa1e6eba712 |
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: | 519 / 1233 |
Version history: | 2 change(s) |
Referenced in: | [show references] |