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

16
LINES

< > BotCompany Repo | #1030747 // test_replaceConceptAndUpdateRefs (OK)

JavaX fragment (include) [tags: use-pretranspiled]

Libraryless. Click here for Pure Java version (14773L/94K).

svoid test_replaceConceptAndUpdateRefs() {
  new Concepts cc;
  Concept a = cnew(cc, "A");
  Concept b = cnew(cc, "B");
  Concept a2 = unlisted("A");
  cset(b, +a);
  print(+a);
  print(+b);
  long id = a.id;
  replaceConceptAndUpdateRefs(a, a2);
  print(+a2);
  print(+b);
  assertSame(cc, a2.concepts());
  assertEquals(id, a2.id);
  assertEquals(allBackRefs(a2), ll(b));
}

download  show line numbers  debug dex  old transpilations   

Travelled to 4 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, vouqrxazstgt

No comments. add comment

Snippet ID: #1030747
Snippet name: test_replaceConceptAndUpdateRefs (OK)
Eternal ID of this version: #1030747/3
Text MD5: c451dbbdf62d8c86d270a5fb86618d74
Transpilation MD5: 5ace05c3c970270ca970618f21162f62
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2021-03-18 22:13:55
Source code size: 390 bytes / 16 lines
Pitched / IR pitched: No / No
Views / Downloads: 259 / 334
Version history: 2 change(s)
Referenced in: [show references]