Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for TestSortStrings (0.61 sec)

  1. pkg/util/slice/slice_test.go

    	if !reflect.DeepEqual(src3, dest3) {
    		t.Errorf("%v and %v are not equal", src3, dest3)
    	}
    
    	src3[0] = "A"
    	if reflect.DeepEqual(src3, dest3) {
    		t.Errorf("CopyStrings didn't make a copy")
    	}
    }
    
    func TestSortStrings(t *testing.T) {
    	src := []string{"a", "c", "b"}
    	dest := SortStrings(src)
    	expected := []string{"a", "b", "c"}
    
    	if !reflect.DeepEqual(dest, expected) {
    		t.Errorf("SortString didn't sort the strings")
    	}
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Jun 30 07:21:37 UTC 2022
    - 3.5K bytes
    - Viewed (0)
Back to top