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

17
LINES

< > BotCompany Repo | #1005267 // Test loadConceptsFromText with non-existing concept classes

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

Libraryless. Click here for Pure Java version (4642L/30K/103K).

!752

concepts.

sS text = [[
hm{1L=c Language(name="english", id=1L, created=1477599163483L, refs=[], backRefs=[], className="Language", fieldValues={}), 2L=c Word(text="hello", id=2L, created=1477599163484L, refs=[], backRefs=[], className="Word", fieldValues={}), 3L=Word(text="world", id=3L, created=1477599163485L, refs=[], backRefs=[], className="Word", fieldValues={}), 4L=Word(text="!", id=4L, created=1477599163485L, refs=[], backRefs=[], className="Word", fieldValues={}), 5L=Word(text="sheep", id=5L, created=1477599387650L, refs=[], backRefs=[], className="Word", fieldValues={})}
]];

p {
  loadConceptsFromText(text);
  for (Concept concept : allConcepts()) {
    print("Class: " + getClassName(concept) + ", ID: " + concept.id);
    print("Fields: " + struct(concept.fieldValues));
    assertTrue(concept.id != 0);
  }
  print("ok!");
}

Author comment

Began life as a copy of #1005265

download  show line numbers  debug dex  old transpilations   

Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, ddnzoavkxhuk, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

-
Snippet ID: #1005267
Snippet name: Test loadConceptsFromText with non-existing concept classes
Eternal ID of this version: #1005267/1
Text MD5: 88125f3694430b95309146bb67a61270
Transpilation MD5: 1efa93ad5e6c9b88eeb748c7c962e8df
Author: stefan
Category: javax / concepts
Type: JavaX source code
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2016-10-27 22:53:14
Source code size: 867 bytes / 17 lines
Pitched / IR pitched: No / No
Views / Downloads: 417 / 476
Referenced in: