Skip to content

Commit

Permalink
Test new methods and DefaultGraph
Browse files Browse the repository at this point in the history
  • Loading branch information
matthieubosquet committed Sep 10, 2024
1 parent 12c0b8b commit 4de9611
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions rdf-js-tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,21 @@ function test_datafactory() {

const variable: Variable = dataFactory.variable ? dataFactory.variable('v1') : <any> {};

const defaultGraph: DefaultGraph = dataFactory.defaultGraph();

const term1: Term = dataFactory.fromTerm(dataFactory.namedNode(""));
const term2: Term = dataFactory.fromTerm(dataFactory.blankNode());
const term3: Term = dataFactory.fromTerm(dataFactory.literal(""));
const term4: Term = dataFactory.fromTerm(dataFactory.variable ? dataFactory.variable("v1") : <any> {});
const term5: Term = dataFactory.fromTerm(dataFactory.defaultGraph());

const quadFromQuad: Term = dataFactory.fromQuad(dataFactory.quad(
dataFactory.namedNode("x"),
dataFactory.namedNode("y"),
dataFactory.literal(""),
dataFactory.defaultGraph()
));

const term: NamedNode = <any> {};
interface QuadBnode extends BaseQuad {
subject: Term;
Expand Down Expand Up @@ -119,6 +134,8 @@ function test_datafactory_star() {
const equalToSelf: boolean = quadBobAge2.equals(quadBobAge);
const notEqualToOtherType: boolean = quadBobAge2.equals(dataFactory.namedNode('ex:something:else'));
}

const quadTerm: Term = dataFactory.fromTerm(quadBobAge);
}

function test_datafactory_star_basequad() {
Expand All @@ -143,6 +160,8 @@ function test_datafactory_star_basequad() {
const equalToSelf: boolean = quadBobAge2.equals(quadBobAge);
const notEqualToOtherType: boolean = quadBobAge2.equals(dataFactory.namedNode('ex:something:else'));
}

const baseQuadTerm: Term = dataFactory.fromTerm(quadBobAge);
}

function test_stream() {
Expand Down

0 comments on commit 4de9611

Please sign in to comment.