MCPcopy Create free account
hub / github.com/nutsdb/nutsdb / TestTx_LSize

Function TestTx_LSize

tx_list_test.go:409–424  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

407}
408
409func TestTx_LSize(t *testing.T) {
410 bucket := "bucket"
411
412 // Calling LSize on a non-existent list
413 runNutsDBTest(t, nil, func(t *testing.T, db *DB) {
414 txCreateBucket(t, db, DataStructureList, bucket, nil)
415 txLSize(t, db, bucket, testutils.GetTestBytes(0), 0, ErrListNotFound)
416 })
417
418 // Calling LSize after adding some values
419 runNutsDBTest(t, nil, func(t *testing.T, db *DB) {
420 txCreateBucket(t, db, DataStructureList, bucket, nil)
421 pushDataByStartEnd(t, db, bucket, 0, 0, 2, false)
422 txLSize(t, db, bucket, testutils.GetTestBytes(0), 3, nil)
423 })
424}
425
426func TestTx_LRemByIndex(t *testing.T) {
427 bucket := "bucket"

Callers

nothing calls this directly

Calls 5

GetTestBytesFunction · 0.92
runNutsDBTestFunction · 0.85
txCreateBucketFunction · 0.85
txLSizeFunction · 0.85
pushDataByStartEndFunction · 0.85

Tested by

no test coverage detected