public class TestBTreeLeafCursors extends TestCase2
BTree
's ILeafCursor
implementation. The
most critical thing about this test suite is that it validates the cursor's
ability to correctly maintain the BTree.Stack
of Node
s over the
current cursor position, especially for ILeafCursor.prior()
and
ILeafCursor.next()
. These tests have to be conducted at a
BTree
depth of 2 (a root node, two nodes beneath that, and then a
layer of leaves under those nodes) in order to test the recursive handling of
the node stack by prior() and next(). getProblem1()
is used for this
purpose.
Note: The leaves are verified by comparing the first key in the leaf against the expected key for that position of that leaf.
TestCase2.MyProperties, TestCase2.RandomType
_randomType, log
Constructor and Description |
---|
TestBTreeLeafCursors() |
TestBTreeLeafCursors(String name) |
Modifier and Type | Method and Description |
---|---|
BTree |
getProblem1()
Create, populate, and return a btree with a branching factor of (3) and
ten sequential keys [1:10].
|
void |
test_firstLast() |
void |
test_forwardScan() |
void |
test_reverseScan() |
void |
test_seek() |
void |
test_stack()
Unit tests for the node stack impl.
|
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEqualsWithinUlps, assertSameArray, assertSameArray, assertSameBigDecimal, assertSameBigDecimal, assertSameBigInteger, assertSameBigInteger, assertSameIterator, assertSameIterator, assertSameIteratorAnyOrder, assertSameIteratorAnyOrder, assertSameValue, assertSameValue, assertZeroUlps, assertZeroUlps, fail, getInnerCause, getNormalInt, getProjectBuildPath, getProperties, getRandomObject, getRandomObject, getRandomOrder, getRandomString, getTestInputStream, getTestResource, getTestResource, getUlps, getUlps, isDEBUG, isDEBUG, isINFO, isINFO, isInnerCause, logProperties
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, countTestCases, createResult, fail, fail, failNotEquals, failNotSame, failSame, format, getName, run, run, runBare, runTest, setName, setUp, tearDown, toString
public TestBTreeLeafCursors()
public TestBTreeLeafCursors(String name)
name
- public void test_stack()
public void test_firstLast()
public void test_seek()
public void test_forwardScan()
public void test_reverseScan()
public BTree getProblem1()
String
s objects
formed using "v+"+i, where i is the integer from which the key was
formed.src/architecture/btree.xls, which details this input tree and a
series of output trees with various branching factors.
Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.