Class TernaryBooleanLogicsTest
- java.lang.Object
- 
- org.apache.tinkerpop.gremlin.AbstractGremlinTest
- 
- org.apache.tinkerpop.gremlin.process.AbstractGremlinProcessTest
- 
- org.apache.tinkerpop.gremlin.process.traversal.step.TernaryBooleanLogicsTest
 
 
 
- 
 public class TernaryBooleanLogicsTest extends AbstractGremlinProcessTest - Author:
- Mike Personick (http://github.com/mikepersonick)
 
- 
- 
Field Summary- 
Fields inherited from class org.apache.tinkerpop.gremlin.AbstractGremlinTestconfig, g, graph, graphProvider, name, shouldTestIteratorLeak
 
- 
 - 
Constructor SummaryConstructors Constructor Description TernaryBooleanLogicsTest()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidtestAnd()Over a ternary binary semantics, the AND predicate evaluates to TRUE only if both arguments are TRUE.voidtestCompareAcrossTypes()Comparisons across type families.voidtestCompareNaN()NaN comparisons always produce UNDEF comparison, reducing to FALSE in ternary->binary reduction.voidtestCompareNull()Null comparisons.voidtestErrorPropagation()Child traversals should propagate error states to their parent traversal if and only if the parent step is a filter step.voidtestNot()The NOT predicate inverts TRUE and FALSE but maintains ERROR values.voidtestOr()Being symetrically defined to AND, OR only returns FALSE in the case that both arguments evalute to FALSE.voidtestXor()Ternary XOR semantics.- 
Methods inherited from class org.apache.tinkerpop.gremlin.process.AbstractGremlinProcessTestcheckHasNext, checkMap, checkOrderedResults, checkResults, checkResults, checkSideEffects, graphMeetsTestRequirements, hasGraphComputerRequirement, makeMapList, setupTest
 - 
Methods inherited from class org.apache.tinkerpop.gremlin.AbstractGremlinTestafterLoadGraphWith, assertVertexEdgeCounts, beforeLoadGraphWith, convertToEdge, convertToEdge, convertToEdgeId, convertToEdgeId, convertToVertex, convertToVertex, convertToVertexId, convertToVertexId, convertToVertexProperty, convertToVertexProperty, convertToVertexPropertyId, convertToVertexPropertyId, getAssertVertexEdgeCounts, printTraversalForm, setup, tearDown, tryCommit, tryCommit, tryRollback, validateException, verifyRootIdentification, verifyUniqueStepIds
 
- 
 
- 
- 
- 
Method Detail- 
testCompareNaNpublic void testCompareNaN() NaN comparisons always produce UNDEF comparison, reducing to FALSE in ternary->binary reduction.
 - 
testCompareNullpublic void testCompareNull() Null comparisons. Null is considered to be a distinct type, thus will produce ERROR for comparison against non-null, just like any cross-type comparison. Null is == null and is != to any non-null (except for NaN, which is always UNDEF/ERROR).
 - 
testCompareAcrossTypespublic void testCompareAcrossTypes() Comparisons across type families. FALSE for P.eq, TRUE for P.neq, and UNDEF with binary reduction to FALSE for P.lt/lte/gt/gte.
 - 
testAndpublic void testAnd() Over a ternary binary semantics, the AND predicate evaluates to TRUE only if both arguments are TRUE. AND will propogate ERROR values unless the other argument evalutes to FALSE, since FALSE && X => FALSE.
 - 
testOrpublic void testOr() Being symetrically defined to AND, OR only returns FALSE in the case that both arguments evalute to FALSE. In cases where one argument is FALSE and the other ERROR, OR propogates the ERROR. Whenever one argument is TRUE, OR returns TRUE since TRUE || X => TRUE.
 - 
testNotpublic void testNot() The NOT predicate inverts TRUE and FALSE but maintains ERROR values. For ERROR, we can neither prove nor disprove the value expression and hence stick with ERROR.
 - 
testXorpublic void testXor() Ternary XOR semantics.
 - 
testErrorPropagationpublic void testErrorPropagation() Child traversals should propagate error states to their parent traversal if and only if the parent step is a filter step.
 
- 
 
-