Browse Source

Fixed compare issue. Also updated unit test to reflect improved similar image performance

master
Drew Short 10 years ago
parent
commit
ed40a2cb57
  1. 1
      engine/src/main/scala/com/sothr/imagetools/engine/image/SimilarImages.scala
  2. 4
      engine/src/test/scala/com/sothr/imagetools/engine/EngineTest.scala

1
engine/src/main/scala/com/sothr/imagetools/engine/image/SimilarImages.scala

@ -34,7 +34,6 @@ class SimilarImages(var similarImages: Set[Image]) extends Logging {
def ordering() = { def ordering() = {
1 * similarImages.size 1 * similarImages.size
similarImages.groupBy(img => img.getImagePath)
} }
} }

4
engine/src/test/scala/com/sothr/imagetools/engine/EngineTest.scala

@ -19,7 +19,7 @@ class EngineTest extends BaseTest {
assertResult(1) { assertResult(1) {
similarImages.length similarImages.length
} }
assertResult(2) {
assertResult(3) {
similarImages(0).similarImages.size similarImages(0).similarImages.size
} }
} }
@ -37,7 +37,7 @@ class EngineTest extends BaseTest {
assertResult(1) { assertResult(1) {
similarImages.length similarImages.length
} }
assertResult(2) {
assertResult(3) {
similarImages(0).similarImages.size similarImages(0).similarImages.size
} }
} }

Loading…
Cancel
Save