summaryrefslogtreecommitdiff
path: root/core/src/test/scala/com/rockymadden/stringmetric/MetricSpec.scala
diff options
context:
space:
mode:
Diffstat (limited to 'core/src/test/scala/com/rockymadden/stringmetric/MetricSpec.scala')
-rw-r--r--core/src/test/scala/com/rockymadden/stringmetric/MetricSpec.scala9
1 files changed, 9 insertions, 0 deletions
diff --git a/core/src/test/scala/com/rockymadden/stringmetric/MetricSpec.scala b/core/src/test/scala/com/rockymadden/stringmetric/MetricSpec.scala
index 3b9021d..538976d 100644
--- a/core/src/test/scala/com/rockymadden/stringmetric/MetricSpec.scala
+++ b/core/src/test/scala/com/rockymadden/stringmetric/MetricSpec.scala
@@ -44,6 +44,15 @@ final class MetricSpec extends ScalaTest {
}
"StringMetricDecorator" should provide {
+ "withMemoization()" in {
+ val memo = MetaphoneMetric withMemoization
+
+ (0 until 1000000) foreach { i =>
+ memo.compare("abc123", "abc456")
+ memo.compare("abc456", "abc123")
+ }
+ }
+
"withTransform()" in {
(MetaphoneMetric withTransform StringTransform.filterAlpha).compare("abc123", "abc456").get should
equal (true)