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

23
LINES

< > BotCompany Repo | #1013620 - Test collectionMutex (OK)

JavaX source code (Dynamic Module) [tags: use-pretranspiled] - run with: Stefan's OS

Uses 974K of libraries. Click here for Pure Java version (7298L/39K).

!7

set flag collectionMutex_debug.

cmodule2 > DynTestModule {
  void test {
    L l = ll();
    assertSame("ArrayList", collectionMutex(l), l);
    
    new HashMap hmap;
    assertSame("HashMap", collectionMutex(keySet(hmap)), hmap);
    
    NavigableMap map = caseInsensitiveMap();
    assertSameVerbose("keySet/caseInsensitiveMap", collectionMutex(keySet(map)), map);
    assertSameVerbose("navigableKeys/caseInsensitiveMap", collectionMutex(navigableKeys(map)), map);
    
    map.put("bla", "");
    assertSameVerbose("prefixSubSet/navigableKeys/caseInsensitiveMap", collectionMutex(printClassName(prefixSubSet(navigableKeys(map), "bla"))), map);
    
    new WeakHashSet whs;
    assertSameVerbose(collectionMutex(whs), whs.map);
  }
}

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1013620
Snippet name: Test collectionMutex (OK)
Eternal ID of this version: #1013620/22
Text MD5: 2fbeb7afbd16bcec09b418e1c7b45ca5
Transpilation MD5: 20e0d6cc918de71622ca4049ed644927
Author: stefan
Category: javax / collections
Type: JavaX source code (Dynamic Module)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2021-05-03 21:41:34
Source code size: 766 bytes / 23 lines
Pitched / IR pitched: No / No
Views / Downloads: 240 / 560
Version history: 21 change(s)
Referenced in: [show references]

Formerly at http://tinybrain.de/1013620 & http://1013620.tinybrain.de