Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for testClose (0.49 sec)

  1. src/archive/tar/writer_test.go

    		}
    		testReadFrom struct { // ReadFrom(testFile{ops}) == (wantCnt, wantErr)
    			ops     fileOps
    			wantCnt int64
    			wantErr error
    		}
    		testClose struct { // Close() == wantErr
    			wantErr error
    		}
    		testFnc any // testHeader | testWrite | testReadFrom | testClose
    	)
    
    	vectors := []struct {
    		file  string // Optional filename of expected output
    		tests []testFnc
    	}{{
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 38.7K bytes
    - Viewed (0)
  2. pkg/slices/slices_test.go

    			result := Reverse(tc.input)
    			if diff := cmp2.Diff(tc.expected, result); diff != "" {
    				t.Errorf("Reverse() mismatch (-want +got):\n%s", diff)
    			}
    		})
    	}
    }
    
    func TestClone(t *testing.T) {
    	tests := []struct {
    		name  string
    		slice []interface{}
    	}{
    		{
    			name:  "Empty",
    			slice: []interface{}{},
    		},
    		{
    			name:  "Single Element",
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Fri May 10 23:33:56 UTC 2024
    - 18.2K bytes
    - Viewed (0)
  3. src/slices/slices_test.go

    		t.Errorf("DeleteFunc: want nil discarded elements, got %v, %v", mem[3], mem[4])
    	}
    	if mem[5] == nil {
    		t.Errorf("DeleteFunc: want unchanged elements beyond original len, got nil")
    	}
    }
    
    func TestClone(t *testing.T) {
    	s1 := []int{1, 2, 3}
    	s2 := Clone(s1)
    	if !Equal(s1, s2) {
    		t.Errorf("Clone(%v) = %v, want %v", s1, s2, s1)
    	}
    	s1[0] = 4
    	want := []int{1, 2, 3}
    	if !Equal(s2, want) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Apr 26 13:32:06 UTC 2024
    - 33.2K bytes
    - Viewed (0)
Back to top