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

10
LINES

< > BotCompany Repo | #1038767 // assertInstanceOfVerbose

JavaX fragment (include)

svoid assertInstanceOfVerbose(Class type, O o) {
  if (isInstance(type, o))
    print("OK: " + _getClass(o) + " is a subclass of " + type);
  else
    fail(_getClass(o) + " is not a subclass of " + type);
}

svoid assertInstanceOfVerbose(O o, Class type) {
  assertInstanceOfVerbose(type, o);
}

Author comment

Began life as a copy of #1018570

download  show line numbers  debug dex  old transpilations   

Travelled to 2 computer(s): elmgxqgtpvxh, mqqgnosmbjvj

No comments. add comment

Snippet ID: #1038767
Snippet name: assertInstanceOfVerbose
Eternal ID of this version: #1038767/2
Text MD5: 9962abe676af23b0f9406d4b9aef63c0
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2024-10-04 23:25:48
Source code size: 299 bytes / 10 lines
Pitched / IR pitched: No / No
Views / Downloads: 24 / 30
Version history: 1 change(s)
Referenced in: [show references]