github.com/dannyzhou2015/migrate/v4@v4.15.2/source/migration_test.go (about) 1 package source 2 3 import ( 4 "testing" 5 ) 6 7 func TestNewMigrations(t *testing.T) { 8 // TODO 9 } 10 11 func TestAppend(t *testing.T) { 12 // TODO 13 } 14 15 func TestBuildIndex(t *testing.T) { 16 // TODO 17 } 18 19 func TestFirst(t *testing.T) { 20 // TODO 21 } 22 23 func TestPrev(t *testing.T) { 24 // TODO 25 } 26 27 func TestUp(t *testing.T) { 28 // TODO 29 } 30 31 func TestDown(t *testing.T) { 32 // TODO 33 } 34 35 func TestFindPos(t *testing.T) { 36 m := Migrations{index: uintSlice{1, 2, 3}} 37 if p := m.findPos(0); p != -1 { 38 t.Errorf("expected -1, got %v", p) 39 } 40 if p := m.findPos(1); p != 0 { 41 t.Errorf("expected 0, got %v", p) 42 } 43 if p := m.findPos(3); p != 2 { 44 t.Errorf("expected 2, got %v", p) 45 } 46 }