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

21
LINES

< > BotCompany Repo | #1024875 // test_structure_synchronizedTreeMap

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

Libraryless. Click here for Pure Java version (5098L/32K).

svoid test_structure_synchronizedTreeMap() {
  Map map = synchronizedTreeMap();
  S name = className(map);
  print(name);
  S s;
  print(s = struct(map));
  Map map2 = cast unstruct(s);
  assertEquals(name, className(map2));
  assertEquals(map, map2);
  
  map.put("c", "d");
  map.put("a", "b");
  map.put("d", "e");
  map.put("e", "f");
  print(s = struct(map));
  map2 = (Map) unstruct(s);
  assertEquals(name, className(map2));
  assertEquals(map, map2);
  
  print("OK");
}

Author comment

Began life as a copy of #1015843

download  show line numbers  debug dex  old transpilations   

Travelled to 6 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1024875
Snippet name: test_structure_synchronizedTreeMap
Eternal ID of this version: #1024875/1
Text MD5: fb62a80176e690175d7150cebf293916
Transpilation MD5: 01a53656d96e656a4ea52c16ed9cf449
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-08-28 12:07:50
Source code size: 498 bytes / 21 lines
Pitched / IR pitched: No / No
Views / Downloads: 251 / 333
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)
#1031244 - test_structure_multiDimensionalIntArrays