Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcbrun2012-11-08 05:27:13 -0500
committercbrun2012-11-12 09:57:47 -0500
commit66589da01c169452c5220cf553bea56dc140a9d3 (patch)
tree0be4932626568c08a820d41f31d10ea0168bacc4 /plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/diff
parentb0ad291109f3e6ec878b9277d59ee39ebd4f2ae8 (diff)
downloadorg.eclipse.emf.compare-66589da01c169452c5220cf553bea56dc140a9d3.tar.gz
org.eclipse.emf.compare-66589da01c169452c5220cf553bea56dc140a9d3.tar.xz
org.eclipse.emf.compare-66589da01c169452c5220cf553bea56dc140a9d3.zip
Content Based Match
Fix and tweak ratios (dumb constant leading to very high sensibility) Externalize a class responsible for providing weights for each feature. Make sure we are always using the same list of valid features while computing max distance and actualy comparing the EObjects
Diffstat (limited to 'plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/diff')
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/diff/URIDistanceTest.java18
1 files changed, 9 insertions, 9 deletions
diff --git a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/diff/URIDistanceTest.java b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/diff/URIDistanceTest.java
index f21309c49..4b29dc7ed 100644
--- a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/diff/URIDistanceTest.java
+++ b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/diff/URIDistanceTest.java
@@ -21,11 +21,11 @@ public class URIDistanceTest {
@Test
public void sameNumberOfFragments() throws Exception {
- assertEquals(3, meter.proximity("/root/a/b", "/root/a/b/c"));
- assertEquals(3, meter.proximity("/root/a/b/", "/root/a/b/c/"));
+ assertEquals(10, meter.proximity("/root/a/b", "/root/a/b/c"));
+ assertEquals(10, meter.proximity("/root/a/b/", "/root/a/b/c/"));
assertEquals(0, meter.proximity("/root/a/b", "/root/a/b"));
- assertEquals(8, meter.proximity("/root/a/a2/a3", "/root/b/b2/a3"));
- assertEquals(8, meter.proximity("/root/a/a2/a3", "/root/b/b2/b3"));
+ assertEquals(10, meter.proximity("/root/a/a2/a3", "/root/b/b2/a3"));
+ assertEquals(10, meter.proximity("/root/a/a2/a3", "/root/b/b2/b3"));
}
@Test
@@ -61,15 +61,15 @@ public class URIDistanceTest {
@Test
public void idLikeURIs() throws Exception {
assertEquals(10, meter.proximity("#131233", "#azeazezae"));
- assertEquals(3, meter.proximity("/c/d/e/f", "/c/d/e/f?#azeaze"));
+ assertEquals(10, meter.proximity("/c/d/e/f", "/c/d/e/f?#azeaze"));
}
@Test
public void traillingSlashes() throws Exception {
- assertEquals(3, meter.proximity("/root/a/b/", "/root/a/b/c/"));
- assertEquals(3, meter.proximity("root/a/b/", "/root/a/b/c/"));
- assertEquals(3, meter.proximity("/root/a/b/", "/root/a/b/c"));
- assertEquals(3, meter.proximity("///root/a/b/", "/root/a/b/c"));
+ assertEquals(10, meter.proximity("/root/a/b/", "/root/a/b/c/"));
+ assertEquals(10, meter.proximity("root/a/b/", "/root/a/b/c/"));
+ assertEquals(10, meter.proximity("/root/a/b/", "/root/a/b/c"));
+ assertEquals(10, meter.proximity("///root/a/b/", "/root/a/b/c"));
}
}

Back to the top