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

28
LINES

< > BotCompany Repo | #1012661 // assertContainsIC

JavaX fragment (include)

1  
static <C extends Collection<S>> C assertContainsIC(C c, S y) {
2  
  ret assertContainsIC(null, c, y);
3  
}
4  
5  
static <C extends Collection<S>> C assertContainsIC(S msg, C c, S y) {
6  
  if (!cic(c, y))
7  
    fail((msg != null ? msg + ": " : "") + y + " not contained in " + c);
8  
  ret c;
9  
}
10  
11  
ifclass Symbol
12  
static <C extends Collection<Symbol>> C assertContainsIC(C c, Symbol y) {
13  
  ret assertContainsIC(null, c, y);
14  
}
15  
16  
static <C extends Collection<Symbol>> C assertContainsIC(S msg, C c, Symbol y) {
17  
  if (!cic(c, y))
18  
    fail((msg != null ? msg + ": " : "") + y + " not contained in " + c);
19  
  ret c;
20  
}
21  
endif
22  
23  
24  
sS assertContainsIC(S x, S y) {
25  
  if (!cic(x, y))
26  
    fail(quote(y) + " not contained in " + quote(x));
27  
  ret x;
28  
}

Author comment

Began life as a copy of #1012660

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: #1012661
Snippet name: assertContainsIC
Eternal ID of this version: #1012661/8
Text MD5: 8461fc2ac42eb9afba7561d623aa6f92
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-08-09 11:45:52
Source code size: 743 bytes / 28 lines
Pitched / IR pitched: No / No
Views / Downloads: 502 / 524
Version history: 7 change(s)
Referenced in: [show references]