MCPcopy Create free account
hub / github.com/distributedio/titan / TestStringGetRange

Function TestStringGetRange

db/string_test.go:366–450  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

364}
365
366func TestStringGetRange(t *testing.T) {
367 type args struct {
368 start int
369 end int
370 }
371 tests := []struct {
372 name string
373 args args
374 want []byte
375 }{
376 {
377 name: "GetRange1",
378 //"StringValue"
379 args: args{
380 start: 4,
381 end: -1,
382 },
383 want: []byte("ngValue"),
384 },
385
386 {
387 name: "GetRange2",
388 args: args{
389 start: 4,
390 end: -20,
391 },
392 want: nil,
393 },
394
395 {
396 name: "GetRange3",
397 args: args{
398 start: -1,
399 end: 3,
400 },
401 want: nil,
402 },
403 {
404 name: "GetRange4",
405 args: args{
406 start: 22,
407 end: 3,
408 },
409 want: nil,
410 },
411
412 {
413 name: "GetRange5",
414 args: args{
415 start: 3,
416 end: 20,
417 },
418 want: []byte("ingValue"),
419 },
420 {
421 name: "GetRange6",
422 args: args{
423 start: -22,

Callers

nothing calls this directly

Calls 4

GetStringFunction · 0.85
MockTestFunction · 0.85
GetRangeMethod · 0.80
SetMethod · 0.65

Tested by

no test coverage detected