Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for TestCopy (0.15 sec)

  1. pkg/file/file_test.go

    	}
    	m, _ := f.Stat()
    	// Mode should be copied
    	assert.Equal(t, m.Mode(), 0o750)
    
    	body, _ := io.ReadAll(f)
    	// Contents should be copied
    	assert.Equal(t, body, []byte("hello world"))
    }
    
    func TestCopy(t *testing.T) {
    	copyTest(t, Copy)
    }
    
    func TestAtomicCopy(t *testing.T) {
    	copyTest(t, AtomicCopy)
    }
    
    func TestAtomicWrite(t *testing.T) {
    	d := t.TempDir()
    	file := filepath.Join(d, "test")
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Mon Dec 11 19:10:54 UTC 2023
    - 1.9K bytes
    - Viewed (0)
  2. src/maps/maps_test.go

    	}
    }
    
    func TestCloneNil(t *testing.T) {
    	var m1 map[string]int
    	mc := Clone(m1)
    	if mc != nil {
    		t.Errorf("Clone(%v) = %v, want %v", m1, mc, m1)
    	}
    }
    
    func TestCopy(t *testing.T) {
    	mc := Clone(m1)
    	Copy(mc, mc)
    	if !Equal(mc, m1) {
    		t.Errorf("Copy(%v, %v) = %v, want %v", m1, m1, mc, m1)
    	}
    	Copy(mc, map[int]int{16: 32})
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Dec 05 17:05:56 UTC 2023
    - 5.6K bytes
    - Viewed (0)
Back to top