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

25
LINES

< > BotCompany Repo | #1012239 // Test SimpleIntList (OK)

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

Download Jar. Libraryless. Click here for Pure Java version (978L/7K).

1  
!7
2  
3  
p {
4  
  final new SimpleIntList l;
5  
  assertEquals(0, l(l));
6  
  assertError(r { l.get(0) });
7  
  l.add(5);
8  
  assertEquals(1, l(l));
9  
  assertEquals(5, l.get(0));
10  
  
11  
  Iterator<Int> it = l.iterator();
12  
  assertTrue(it.hasNext());
13  
  assertEquals(5, it.next());
14  
  assertFalse(it.hasNext());
15  
  
16  
  l.add((Int) 10);
17  
  assertEquals(10, l.get(1));
18  
  
19  
  int[] a = l.toIntArray();
20  
  assertEquals(2, l(a));
21  
  assertEquals(5, a[0]);
22  
  assertEquals(10, a[1]);
23  
  
24  
  print("OK");
25  
}

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: #1012239
Snippet name: Test SimpleIntList (OK)
Eternal ID of this version: #1012239/3
Text MD5: 72a3327a996ffe267cd3602acfffe63c
Transpilation MD5: b85e2aec7f38e72534a19bec76fe2a41
Author: stefan
Category: javax
Type: JavaX source code (desktop)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-11-26 11:52:31
Source code size: 486 bytes / 25 lines
Pitched / IR pitched: No / No
Views / Downloads: 491 / 1057
Version history: 2 change(s)
Referenced in: [show references]