From f77a1b2c476f5add3e56c0fdc370ca81dc7b0da3 Mon Sep 17 00:00:00 2001 From: Ruben Taelman Date: Thu, 30 Aug 2018 13:55:12 +0200 Subject: [PATCH] Add unit test for graphs with non-equal blank node count --- test/RdfIsomorphic-test.ts | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/test/RdfIsomorphic-test.ts b/test/RdfIsomorphic-test.ts index 913752d..b804e35 100644 --- a/test/RdfIsomorphic-test.ts +++ b/test/RdfIsomorphic-test.ts @@ -122,6 +122,24 @@ describe('isomorphic', () => { ]; return expect(isomorphic(graphA, graphB)).toBe(true); }); + + it('should not be isomorphic for 2 graphs with single full-blank triples', () => { + const graphA = [ + DataFactory.quad( + DataFactory.blankNode('a1'), + DataFactory.blankNode('b1'), + DataFactory.blankNode('a1'), + ), + ]; + const graphB = [ + DataFactory.quad( + DataFactory.blankNode('a2'), + DataFactory.blankNode('b2'), + DataFactory.blankNode('c2'), + ), + ]; + return expect(isomorphic(graphA, graphB)).toBe(false); + }); }); });