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

16
LINES

< > BotCompany Repo | #1031776 // test_setGetSyntax (OK)

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

Libraryless. Click here for Pure Java version (2838L/17K).

svoid test_setGetSyntax() {
  class X {
    S name;
    
    {
      (get/set name).set("hello");
      assertEqualsVerbose(name, "hello");
      assertEqualsVerbose("hello", (get/set name)!);
    }
  }
  
  new X x;
  get/set name(x).set("world");
  assertEqualsVerbose(x.name, "world");
  assertEqualsVerbose("world", get/set name(x)!);
}

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1031776
Snippet name: test_setGetSyntax (OK)
Eternal ID of this version: #1031776/4
Text MD5: 54bbaa376a8f00d600cad08fa57c5cdd
Transpilation MD5: b603d4bd56cd73f0354172a8ecbf683d
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2021-06-29 17:25:30
Source code size: 355 bytes / 16 lines
Pitched / IR pitched: No / No
Views / Downloads: 149 / 237
Version history: 3 change(s)
Referenced in: [show references]