Browse Source

Updated test to ensure repeated derivations still share the same resource.

pull/188/head
weisj 4 years ago
parent
commit
9eb8e38171
  1. 3
      property-loader/src/test/java/com/github/weisj/darklaf/icons/DerivableImageIconTest.java

3
property-loader/src/test/java/com/github/weisj/darklaf/icons/DerivableImageIconTest.java

@ -47,7 +47,8 @@ public class DerivableImageIconTest {
imageSet.clear(); imageSet.clear();
icon = icon.derive(50, 50); icon = icon.derive(50, 50);
for (int i = 0; i < 100; i++) { for (int i = 0; i < 100; i++) {
imageSet.add(icon.derive(50, 50).getImage()); icon = icon.derive(50, 50);
imageSet.add(icon.getImage());
} }
Assertions.assertEquals(1, imageSet.size()); Assertions.assertEquals(1, imageSet.size());
} }

Loading…
Cancel
Save