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

14
LINES

< > BotCompany Repo | #1035845 // test_HashedImage2B

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

Libraryless. Click here for Pure Java version (11292L/65K).

svoid test_HashedImage2B() {
  var img1 = randomImage(10);
  var himg1 = new HashedImage2B(img1);
  var himg2 = new HashedImage2B(img1);
  assertEquals(himg1.hashCode(), himg2.hashCode());
  assertEquals(himg1.hash(), himg2.hash());
  assertEquals(himg1, himg2);
  
  var img3 = randomImage(10);
  var himg3 = new HashedImage2B(img3);
  assertNotEquals(himg1.hashCode(), himg3.hashCode());
  assertNotEquals(himg1.hash(), himg3.hash());
  assertNotEquals(himg1, himg3);
}

Author comment

Began life as a copy of #1034844

download  show line numbers  debug dex  old transpilations   

Travelled to 3 computer(s): elmgxqgtpvxh, mqqgnosmbjvj, wnsclhtenguj

No comments. add comment

Snippet ID: #1035845
Snippet name: test_HashedImage2B
Eternal ID of this version: #1035845/1
Text MD5: a33324a8ff608c027c878bb2527c2ff3
Transpilation MD5: c47b44b245f7a120887906ba246d88b5
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2022-08-02 20:58:38
Source code size: 484 bytes / 14 lines
Pitched / IR pitched: No / No
Views / Downloads: 138 / 176
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)