forked from comunica/comunica
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7938868
commit 7bc642d
Showing
67 changed files
with
516 additions
and
432 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
packages/actor-expression-evaluator-factory-base/test/Algebra-EBVCoercion-test.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import { getMockExpression } from '@comunica/expression-evaluator/test/util/utils'; | ||
import { getMockEEActionContext, getMockMediatorFunctions } from '@comunica/jest'; | ||
import { DataFactory } from 'rdf-data-factory'; | ||
import type { Algebra } from 'sparqlalgebrajs'; | ||
import { AlgebraTransformer } from '../lib/AlgebraTransformer'; | ||
|
||
const DF = new DataFactory(); | ||
|
||
// https://www.w3.org/TR/sparql11-query/#ebv | ||
// Using && as utility to force EBV | ||
describe('the coercion of RDF terms to it\'s EBV like', () => { | ||
const transformer = new AlgebraTransformer(getMockEEActionContext(), getMockMediatorFunctions()); | ||
|
||
function testCannotCoerce(expression: Algebra.Expression) { | ||
it(`should not coerce ${expression.expressionType}`, async() => { | ||
const transformed = await transformer.transformAlgebra(expression); | ||
expect(() => (<any> transformed).coerceEBV()).toThrow(); | ||
}); | ||
} | ||
|
||
describe('raw algebra test', () => { | ||
testCannotCoerce(getMockExpression('?a')); | ||
testCannotCoerce(getMockExpression('<http://example.com>')); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.