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

12
LINES

< > BotCompany Repo | #1031248 // test_structure_stringArrays

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

Libraryless. Click here for Pure Java version (6265L/38K).

svoid test_structure_stringArrays() {
  S[] a = new { "hello", "world", null };
  
  assertEqualsVerbose([[array S{"hello", "world", null}]], struct(a));
  S[] a2 = restruct(a);
  assertEqualsVerbose(toList(a), toList(a2));
  
  S[][] b = { a };
  assertEqualsVerbose([[array S/2{array S{"hello", "world", null}}]], struct(b));
  S[][] b2 = restruct(b);
  assertEqualsVerbose(lmap toList(b), lmap toList(b2));
}

Author comment

Began life as a copy of #1031244

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1031248
Snippet name: test_structure_stringArrays
Eternal ID of this version: #1031248/4
Text MD5: ed5470d066ddd25530162c405da0117b
Transpilation MD5: 5c61547afd5b0f74370f43951135c8c7
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2021-05-25 18:22:30
Source code size: 422 bytes / 12 lines
Pitched / IR pitched: No / No
Views / Downloads: 210 / 287
Version history: 3 change(s)
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)
#1031647 - test_structure_lambdasAndAnonymousClasses
#1031872 - test_structure_OptimizedMultiSet (OK)
#1036238 - test_structure_floatingPoint