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

23
LINES

< > BotCompany Repo | #1031079 // DynTestModule - module running a single test

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

Libraryless. Click here for Pure Java version (14273L/87K).

asclass DynTestModule > DynPrintLog {
  transient bool running;
  bool ok;
  PersistableThrowable error;
  
  // override me!
  void test {}
  
  start-thread {
    running = true;
    try {
      test();
      setFields(ok := true, error := null);
      printWithNewLineBefore("Successss");
      applause();
    } catch print e {
      infoBox(exceptionToStringShort(e));
      setFields(ok := false, error := toPersistableThrowable(e));
    } finally {
      running = false;
    }
  }
}

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1031079
Snippet name: DynTestModule - module running a single test
Eternal ID of this version: #1031079/5
Text MD5: 223c24091438f09350cb0cc64963f398
Transpilation MD5: 30ce96a995a1ab481bec90546168e047
Author: stefan
Category: javax / stefan's os
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2021-07-16 06:17:22
Source code size: 512 bytes / 23 lines
Pitched / IR pitched: No / No
Views / Downloads: 197 / 420
Version history: 4 change(s)
Referenced in: [show references]