You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When two SDocumentGraphs a and b are distinct in an SSpan's coverage (b's span's coverage is a subset of a's span's coverage), the graph comparison via findDiffs(...) reveals to not be symmetric. The difference is not detected in a.findDiffs(b), but in b.findDiffs(a).
See also the following test snippet:
@Test
public void testGraphIsoTest() {
String text = "This is a test. With spans.";
SDocumentGraph a = SaltFactory.createSDocumentGraph();
a.createTextualDS(text);
a.tokenize();
a.createSpan( a.getTokens().get(1), a.getTokens().get(2), a.getTokens().get(3) );
a.setDocument( SaltFactory.createSDocument() );
SDocumentGraph b = SaltFactory.createSDocumentGraph();
b.createTextualDS(text);
b.tokenize();
b.createSpan( b.getTokens().get(1), b.getTokens().get(2) );
b.setDocument( SaltFactory.createSDocument() );
assertEquals(a.findDiffs(b).size(), b.findDiffs(a).size()); // fails, expects 0 and finds 1
}
The reported trace is:
java.lang.AssertionError: expected:<0> but was:<1>
at org.junit.Assert.fail(Assert.java:88)
at org.junit.Assert.failNotEquals(Assert.java:743)
at org.junit.Assert.assertEquals(Assert.java:118)
at org.junit.Assert.assertEquals(Assert.java:555)
at org.junit.Assert.assertEquals(Assert.java:542)
at org.corpus_tools.pepperModules.sgsTEIModules.SgsTEIImporterTest.testDummyTest(SgsTEIImporterTest.java:145)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:86)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:459)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:678)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)
The text was updated successfully, but these errors were encountered:
When two
SDocumentGraph
s a and b are distinct in anSSpan
's coverage (b's span's coverage is a subset of a's span's coverage), the graph comparison viafindDiffs(...)
reveals to not be symmetric. The difference is not detected ina.findDiffs(b)
, but inb.findDiffs(a)
.See also the following test snippet:
The reported trace is:
The text was updated successfully, but these errors were encountered: