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

20
LINES

< > BotCompany Repo | #1012711 // Test case-insensitive symbols (FIXED!)

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

Download Jar. Libraryless. Click here for Pure Java version (2537L/18K).

!7

unset flag SymbolAsString.
//set flag symbol_debug.

p {
  Symbol a = symbol("abc");
  gc();
  Symbol b = symbol("ABC");
  Symbol c = symbol("def");
  assertEqualsVerbose("abc", str(a));
  assertEqualsVerbose("ABC", str(b));
  assertEqualsVerbose("def", str(c));
  assertEqualsVerbose(a, a);
  assertEqualsVerbose(a, b);
  assertNotEqualsVerbose(a, c);
  assertEqualsVerbose(a.hashCode(), b.hashCode());
  print(c.hashCode());
  if (c.hashCode() == a.hashCode()) print("weird. fluke?"); else print("OK");
}

Author comment

Began life as a copy of #1012687

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: #1012711
Snippet name: Test case-insensitive symbols (FIXED!)
Eternal ID of this version: #1012711/2
Text MD5: 80a72f6f92558bcf9df2f94dc0cc3ece
Transpilation MD5: 36bdf2bb230075b4e9578cd207518395
Author: stefan
Category: javax
Type: JavaX source code (desktop)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-12-10 21:56:10
Source code size: 529 bytes / 20 lines
Pitched / IR pitched: No / No
Views / Downloads: 324 / 766
Version history: 1 change(s)
Referenced in: [show references]