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

20
LINES

< > BotCompany Repo | #1012269 // Test GlobalID (OK)

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

Download Jar. Libraryless. Click here for Pure Java version (2398L/16K).

1  
!7
2  
3  
set flag GlobalID_debug.
4  
5  
p {
6  
  S a = aGlobalID(), b = aGlobalID();
7  
  print(a + " / " + b);
8  
  GlobalID idA = GlobalID(a), idB = GlobalID(b);
9  
  print(sfu(idA) + " / " + sfu(idB));
10  
  print(idA + " / " + idB);
11  
  assertEquals(a, str(idA));
12  
  assertEquals(b, str(idB));
13  
  assertEquals(idA, GlobalID(a));
14  
  assertEquals(idB, GlobalID(b));
15  
  assertFalse(idA.equals(idB));
16  
  print("Size comparison:");
17  
  print("  GlobalID=" + unsafe_sizeOf(GlobalID));
18  
  print("  String=" + guessStringSize(l(a));
19  
  print("OK");
20  
}

download  show line numbers  debug dex  old transpilations   

Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, onxytkatvevr, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1012269
Snippet name: Test GlobalID (OK)
Eternal ID of this version: #1012269/9
Text MD5: 226ee4f0f4a48e2154fbb87da7dcf51e
Transpilation MD5: 4e858ac11212e8569454e8c43a1568f0
Author: stefan
Category: javax
Type: JavaX source code (desktop)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-11-28 23:27:12
Source code size: 528 bytes / 20 lines
Pitched / IR pitched: No / No
Views / Downloads: 561 / 1293
Version history: 8 change(s)
Referenced in: [show references]