File: sync_test.go

package info (click to toggle)
golang-github-anacrolix-sync 0.5.3-2
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 144 kB
  • sloc: makefile: 2
file content (35 lines) | stat: -rw-r--r-- 423 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
package sync

import (
	"bytes"
	"testing"
)

func init() {
	Enable()
}

func TestLog(t *testing.T) {
	var mu Mutex
	mu.Lock()
	mu.Unlock()
}

func TestRWMutex(t *testing.T) {
	var mu RWMutex
	mu.RLock()
	mu.RUnlock()
}

func TestPointerCompare(t *testing.T) {
	a, b := new(int), new(int)
	if a == b {
		t.FailNow()
	}
}

func TestLockTime(t *testing.T) {
	var buf bytes.Buffer
	PrintLockTimes(&buf)
	t.Log(buf.String())
}