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

41
LINES

< > BotCompany Repo | #1009421 // PersistentLister TreeMap Bug Test [OK]

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

Libraryless. Click here for Pure Java version (8063L/54K/181K).

1  
!7
2  
3  
static Map<S, Long> map;
4  
5  
//set flag structure_debug.
6  
set flag unstructure_debug.
7  
8  
p {
9  
  deleteDB();
10  
  l_persistentLister();
11  
  map = l_getTreeMap("German words with count");
12  
  checkMap(0);
13  
  map = l_getTreeMap("German words with count");
14  
  checkMap(0);
15  
  sleepSeconds(2);
16  
  longMultiSet_add(map, "Hallo");
17  
  print("Words now: " + sfu(map));
18  
  assertEquals(1, l(map));
19  
  
20  
  l_persistentLister(null);
21  
  l_dropDefaultLister();
22  
  dbOff();
23  
  print("\nOn disk: " + loadConceptsStructure() + "\n");
24  
  
25  
  db();
26  
  l_persistentLister();
27  
  map = l_getTreeMap("German words with count");
28  
  checkMap(1);
29  
  
30  
  dbOff();
31  
  print("\nOn disk: " + loadConceptsStructure() + "\n");
32  
}
33  
34  
svoid checkMap(int size) {
35  
  print("Map type: " + className(map) + ", hash code: " + identityHashCode(map));
36  
  assertTrue(map << MapInConcept);
37  
  assertTrue("Map sane", getOpt_raw(map, 'm) != null);
38  
  assertEquals(size, l(map));
39  
  print("Size: " + l(map));
40  
  print("Words: " + sfu(map));
41  
}

Author comment

Began life as a copy of #1009416

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: #1009421
Snippet name: PersistentLister TreeMap Bug Test [OK]
Eternal ID of this version: #1009421/19
Text MD5: 06f5c692c81da2a1f64141b99dc74bf8
Transpilation MD5: 43619a02cfe0d87d96ebd07798a4a34f
Author: stefan
Category: javax / a.i.
Type: JavaX source code
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-08-01 19:32:29
Source code size: 998 bytes / 41 lines
Pitched / IR pitched: No / No
Views / Downloads: 518 / 762
Version history: 18 change(s)
Referenced in: [show references]