diff options
author | Rocky Madden <git@rockymadden.com> | 2012-10-26 19:18:39 -0600 |
---|---|---|
committer | Rocky Madden <git@rockymadden.com> | 2012-10-26 19:18:39 -0600 |
commit | b042c8d7210aba5e2a6d8c35f06f2ecfa80c73c9 (patch) | |
tree | 353ebee00afa4b2ea1ad1755a0cd2e723845dc6f /core/source/test | |
parent | d1f5fd5438a6867edf873399b4683b935b33a8ef (diff) | |
download | stringmetric-b042c8d7210aba5e2a6d8c35f06f2ecfa80c73c9.tar.gz stringmetric-b042c8d7210aba5e2a6d8c35f06f2ecfa80c73c9.tar.bz2 stringmetric-b042c8d7210aba5e2a6d8c35f06f2ecfa80c73c9.zip |
Changed return type from float to double.
Diffstat (limited to 'core/source/test')
3 files changed, 34 insertions, 34 deletions
diff --git a/core/source/test/scala/org/hashtree/stringmetric/similarity/DiceSorensenMetricSpec.scala b/core/source/test/scala/org/hashtree/stringmetric/similarity/DiceSorensenMetricSpec.scala index 1860984..70d2c25 100755 --- a/core/source/test/scala/org/hashtree/stringmetric/similarity/DiceSorensenMetricSpec.scala +++ b/core/source/test/scala/org/hashtree/stringmetric/similarity/DiceSorensenMetricSpec.scala @@ -17,17 +17,17 @@ final class DiceSorensenMetricSpec extends ScalaTest { } "equal arguments" should returns { "1" in { - DiceSorensenMetric.compare("abc", "abc").get should be (1.0f) + DiceSorensenMetric.compare("abc", "abc").get should be (1) } } "unequal arguments" should returns { "0" in { - DiceSorensenMetric.compare("abc", "xyz").get should be (0.0f) + DiceSorensenMetric.compare("abc", "xyz").get should be (0) } } "valid arguments" should returns { - "Float indicating distance" in { - DiceSorensenMetric.compare("night", "nacht").get should be (0.25f) + "Double indicating distance" in { + DiceSorensenMetric.compare("night", "nacht").get should be (0.25) } } } diff --git a/core/source/test/scala/org/hashtree/stringmetric/similarity/JaroMetricSpec.scala b/core/source/test/scala/org/hashtree/stringmetric/similarity/JaroMetricSpec.scala index 31f066c..8fd12b1 100755 --- a/core/source/test/scala/org/hashtree/stringmetric/similarity/JaroMetricSpec.scala +++ b/core/source/test/scala/org/hashtree/stringmetric/similarity/JaroMetricSpec.scala @@ -17,28 +17,28 @@ final class JaroMetricSpec extends ScalaTest { } "equal arguments" should returns { "1" in { - JaroMetric.compare("a", "a").get should be (1.0f) - JaroMetric.compare("abc", "abc").get should be (1.0f) + JaroMetric.compare("a", "a").get should be (1) + JaroMetric.compare("abc", "abc").get should be (1) } } "unequal arguments" should returns { "0" in { - JaroMetric.compare("abc", "xyz").get should be (0.0f) + JaroMetric.compare("abc", "xyz").get should be (0) } } "valid arguments" should returns { - "Float indicating distance" in { - JaroMetric.compare("aa", "a").get should be (0.8333333f) - JaroMetric.compare("a", "aa").get should be (0.8333333f) - JaroMetric.compare("veryveryverylong", "v").get should be (0.6875f) - JaroMetric.compare("v", "veryveryverylong").get should be (0.6875f) - JaroMetric.compare("martha", "marhta").get should be (0.9444444f) - JaroMetric.compare("dwayne", "duane").get should be (0.82222223f) - JaroMetric.compare("dixon", "dicksonx").get should be (0.76666665f) - JaroMetric.compare("abcvwxyz", "cabvwxyz").get should be (0.9583333f) - JaroMetric.compare("jones", "johnson").get should be (0.79047614f) - JaroMetric.compare("henka", "henkan").get should be (0.9444444f) - JaroMetric.compare("fvie", "ten").get should be (0.0f) + "Double indicating distance" in { + JaroWinklerMetric.compare("aa", "a").get should be (0.8500000000000001) + JaroWinklerMetric.compare("a", "aa").get should be (0.8500000000000001) + JaroWinklerMetric.compare("veryveryverylong", "v").get should be (0.71875) + JaroWinklerMetric.compare("v", "veryveryverylong").get should be (0.71875) + JaroWinklerMetric.compare("martha", "marhta").get should be (0.9611111111111111) + JaroWinklerMetric.compare("dwayne", "duane").get should be (0.8400000000000001) + JaroWinklerMetric.compare("dixon", "dicksonx").get should be (0.8133333333333332) + JaroWinklerMetric.compare("abcvwxyz", "cabvwxyz").get should be (0.9583333333333334) + JaroWinklerMetric.compare("jones", "johnson").get should be (0.8323809523809523) + JaroWinklerMetric.compare("henka", "henkan").get should be (0.9666666666666667) + JaroWinklerMetric.compare("fvie", "ten").get should be (0) JaroMetric.compare("zac ephron", "zac efron").get should be > JaroMetric.compare("zac ephron", "kai ephron").get diff --git a/core/source/test/scala/org/hashtree/stringmetric/similarity/JaroWinklerMetricSpec.scala b/core/source/test/scala/org/hashtree/stringmetric/similarity/JaroWinklerMetricSpec.scala index d118c48..a66e4b9 100755 --- a/core/source/test/scala/org/hashtree/stringmetric/similarity/JaroWinklerMetricSpec.scala +++ b/core/source/test/scala/org/hashtree/stringmetric/similarity/JaroWinklerMetricSpec.scala @@ -17,28 +17,28 @@ final class JaroWinklerMetricSpec extends ScalaTest { } "equal arguments" should returns { "1" in { - JaroWinklerMetric.compare("a", "a").get should be (1.0f) - JaroWinklerMetric.compare("abc", "abc").get should be (1.0f) + JaroWinklerMetric.compare("a", "a").get should be (1) + JaroWinklerMetric.compare("abc", "abc").get should be (1) } } "unequal arguments" should returns { "0" in { - JaroWinklerMetric.compare("abc", "xyz").get should be (0.0f) + JaroWinklerMetric.compare("abc", "xyz").get should be (0) } } "valid arguments" should returns { - "Float indicating distance" in { - JaroWinklerMetric.compare("aa", "a").get should be (0.84999996f) - JaroWinklerMetric.compare("a", "aa").get should be (0.84999996f) - JaroWinklerMetric.compare("veryveryverylong", "v").get should be (0.71875f) - JaroWinklerMetric.compare("v", "veryveryverylong").get should be (0.71875f) - JaroWinklerMetric.compare("martha", "marhta").get should be (0.96111107f) - JaroWinklerMetric.compare("dwayne", "duane").get should be (0.84000003f) - JaroWinklerMetric.compare("dixon", "dicksonx").get should be (0.81333333f) - JaroWinklerMetric.compare("abcvwxyz", "cabvwxyz").get should be (0.9583333f) - JaroWinklerMetric.compare("jones", "johnson").get should be (0.8323809f) - JaroWinklerMetric.compare("henka", "henkan").get should be (0.96666664f) - JaroWinklerMetric.compare("fvie", "ten").get should be (0.0f) + "Double indicating distance" in { + JaroWinklerMetric.compare("aa", "a").get should be (0.8500000000000001) + JaroWinklerMetric.compare("a", "aa").get should be (0.8500000000000001) + JaroWinklerMetric.compare("veryveryverylong", "v").get should be (0.71875) + JaroWinklerMetric.compare("v", "veryveryverylong").get should be (0.71875) + JaroWinklerMetric.compare("martha", "marhta").get should be (0.9611111111111111) + JaroWinklerMetric.compare("dwayne", "duane").get should be (0.8400000000000001) + JaroWinklerMetric.compare("dixon", "dicksonx").get should be (0.8133333333333332) + JaroWinklerMetric.compare("abcvwxyz", "cabvwxyz").get should be (0.9583333333333334) + JaroWinklerMetric.compare("jones", "johnson").get should be (0.8323809523809523) + JaroWinklerMetric.compare("henka", "henkan").get should be (0.9666666666666667) + JaroWinklerMetric.compare("fvie", "ten").get should be (0) JaroWinklerMetric.compare("zac ephron", "zac efron").get should be > JaroWinklerMetric.compare("zac ephron", "kai ephron").get |