// TestBrowserBack ensures that the browser decrements the index and wraps
// to max index.
TestBrowserBack ensures that the browser decrements the index and wraps
to max index.
// TestBrowserBack ensures that the browser decrements the index and wraps // to max index .
func TestBrowserBack(t *testing.T) {
	fb := FileBrowser{1, []string{"1", "2", "3"}}
	for _, want := range []string{"1", "3"} {
		fb.Back()
		if actual := fb.Current(); actual != want {
			t.Errorf(`Did not go to next index; got %q @ %d, want %q`, actual, fb.index, want)
		}
	}
}
func TestBrowserBack ( t * testing . T ) { fb := FileBrowser { 1 , [ ] string { " " , " " , " " } } for _ , want := range [ ] string { " " , " " } { fb . Back ( ) if actual := fb . Current ( ) ; actual != want { t . Errorf ( `Did not go to next index; got %q @ %d, want %q` , actual , fb . index , want ) } } }
TestBrowserBack ensures that the browser decrements the index and wraps
to max index.
TestBrowserBack ensures that the browser decrements the index and wraps to max index .