test

package
v2.0.0-...-b06326d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 16, 2025 License: Apache-2.0, MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TeseDeleteLeafNearMiddleNodeLeftBranch

func TeseDeleteLeafNearMiddleNodeLeftBranch(t *testing.T, sto merkletree.Storage)

func TeseDeleteLeafNearMiddleNodeLeftBranchDeep

func TeseDeleteLeafNearMiddleNodeLeftBranchDeep(t *testing.T, sto merkletree.Storage)

func TestAddAndGetCircomProof

func TestAddAndGetCircomProof(t *testing.T, sto merkletree.Storage)

func TestAddDifferentOrder

func TestAddDifferentOrder(t *testing.T, sto merkletree.Storage,
	sto2 merkletree.Storage)

func TestAddRepeatedIndex

func TestAddRepeatedIndex(t *testing.T, sto merkletree.Storage)

func TestAll

func TestAll(t *testing.T, sb StorageBuilder)

func TestCalculatingOfNewRootLeftBranch

func TestCalculatingOfNewRootLeftBranch(t *testing.T, sto merkletree.Storage)

Checking whether the new root will be calculated from to leafs

         root
       /     \
 MiddleNode  01
  /   \
100   010

Up to:

  root
 /   \
100  001

func TestCalculatingOfNewRootRightBranch

func TestCalculatingOfNewRootRightBranch(t *testing.T, sto merkletree.Storage)

Checking whether the new root will be calculated from to leafs

  root
 /    \
10  MiddleNode
      /   \
     01   11

Up to:

 root
 /  \
10  11

func TestDelete

func TestDelete(t *testing.T, sto merkletree.Storage)

func TestDelete2

func TestDelete2(t *testing.T, sto merkletree.Storage,
	sto2 merkletree.Storage)

func TestDelete3

func TestDelete3(t *testing.T, sto merkletree.Storage,
	sto2 merkletree.Storage)

func TestDelete4

func TestDelete4(t *testing.T, sto merkletree.Storage,
	sto2 merkletree.Storage)

func TestDelete5

func TestDelete5(t *testing.T, sto merkletree.Storage,
	sto2 merkletree.Storage)

func TestDeleteLeafNearMiddleNodeRightBranch

func TestDeleteLeafNearMiddleNodeRightBranch(t *testing.T, sto merkletree.Storage)

func TestDeleteLeafNearMiddleNodeRightBranchDeep

func TestDeleteLeafNearMiddleNodeRightBranchDeep(t *testing.T, sto merkletree.Storage)

func TestDeleteNonExistingKeys

func TestDeleteNonExistingKeys(t *testing.T, sto merkletree.Storage)

func TestDumpLeafsImportLeafs

func TestDumpLeafsImportLeafs(t *testing.T, sto merkletree.Storage,
	sto2 merkletree.Storage)

func TestGenerateAndVerifyProof128

func TestGenerateAndVerifyProof128(t *testing.T, sto merkletree.Storage)

func TestGet

func TestGet(t *testing.T, sto merkletree.Storage)

func TestGraphViz

func TestGraphViz(t *testing.T, sto merkletree.Storage)

func TestInsertDeletedNodeThenUpdateItLeftBranch

func TestInsertDeletedNodeThenUpdateItLeftBranch(t *testing.T, sto merkletree.Storage)

func TestInsertDeletedNodeThenUpdateItRightBranch

func TestInsertDeletedNodeThenUpdateItRightBranch(t *testing.T, sto merkletree.Storage)

func TestInsertNodeAfterDelete

func TestInsertNodeAfterDelete(t *testing.T, sto merkletree.Storage)

https://github.com/iden3/go-merkletree-sql/issues/23

func TestNewTree

func TestNewTree(t *testing.T, sto merkletree.Storage)

func TestPushLeafAlreadyExistsLeftBranch

func TestPushLeafAlreadyExistsLeftBranch(t *testing.T, sto merkletree.Storage)

func TestPushLeafAlreadyExistsRightBranch

func TestPushLeafAlreadyExistsRightBranch(t *testing.T, sto merkletree.Storage)

func TestReturnKnownErrIfNotExists

func TestReturnKnownErrIfNotExists(t *testing.T, sto merkletree.Storage)

TestReturnKnownErrIfNotExists checks that the implementation of the db.Storage interface returns the expected error in the case that the value is not found

func TestSiblingsFromProof

func TestSiblingsFromProof(t *testing.T, sto merkletree.Storage)

func TestSmtVerifier

func TestSmtVerifier(t *testing.T, sto merkletree.Storage)

func TestStorageInsertGet

func TestStorageInsertGet(t *testing.T, sto merkletree.Storage)

TestStorageInsertGet checks that the implementation of the db.Storage interface behaves as expected

func TestTreeLimit

func TestTreeLimit(t *testing.T, sto merkletree.Storage)

func TestTreeRootWithOneNode

func TestTreeRootWithOneNode(t *testing.T, sto merkletree.Storage)

func TestTypesMarshalers

func TestTypesMarshalers(t *testing.T, sto merkletree.Storage)

func TestUpNodesToTwoLevelsLeftBranch

func TestUpNodesToTwoLevelsLeftBranch(t *testing.T, sto merkletree.Storage)

func TestUpNodesToTwoLevelsRightBranch

func TestUpNodesToTwoLevelsRightBranch(t *testing.T, sto merkletree.Storage)

func TestUpToRootAfterDeleteLeftBranch

func TestUpToRootAfterDeleteLeftBranch(t *testing.T, sto merkletree.Storage)

Checking whether the last leaf will be moved to the root position

	   root
 	 /      \
	MiddleNode  0
	 /   \
	100  010

Up to:

root(100)

func TestUpToRootAfterDeleteRightBranch

func TestUpToRootAfterDeleteRightBranch(t *testing.T, sto merkletree.Storage)

Checking whether the last leaf will be moved to the root position

   root
 /     \
0    MiddleNode
      /   \
     01   11

Up to:

root(11)

func TestUpdate

func TestUpdate(t *testing.T, sto merkletree.Storage)

func TestUpdate2

func TestUpdate2(t *testing.T, sto merkletree.Storage)

func TestUpdateCircomProcessorProof

func TestUpdateCircomProcessorProof(t *testing.T, sto merkletree.Storage)

func TestVerifyProofCases

func TestVerifyProofCases(t *testing.T, sto merkletree.Storage)

func TestVerifyProofFalse

func TestVerifyProofFalse(t *testing.T, sto merkletree.Storage)

Types

type StorageBuilder

type StorageBuilder interface {
	NewStorage(t *testing.T) merkletree.Storage
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL