Libraryless. Click here for Pure Java version (15763L/101K).
svoid test_uniqCI() { // try old & new mode for (bool collectForwardRefs : ll(true, false)) { new Concepts cc; cc.collectForwardRefs = collectForwardRefs; Concept a = cnew(cc, Concept); Concept b = uniqCI(cc, Concept, myRef := a); assertSameVerbose(cc, a.concepts()); assertSameVerbose(cc, b.concepts()); assertEqualsVerbose(a, cget(b, "myRef")); assertEqualsVerbose("refs field", collectForwardRefs, b._rawRefsField() != null); assertEqualsVerbose("num refs", 1, l(b._refs())); assertEqualsVerbose("num back refs", 1, l(a.backRefs)); assertEquals(ll(b), findBackRefs(a)); } }
download show line numbers debug dex old transpilations
Travelled to 4 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, vouqrxazstgt
No comments. add comment
Snippet ID: | #1030874 |
Snippet name: | test_uniqCI (with dynamic reference field) |
Eternal ID of this version: | #1030874/8 |
Text MD5: | 7034163226d502ea6bc5825edd7ae652 |
Transpilation MD5: | 4702acb3e7562e83722437039e355054 |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2021-05-12 23:42:49 |
Source code size: | 641 bytes / 16 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 183 / 291 |
Version history: | 7 change(s) |
Referenced in: | [show references] |