Revision 470b3207efe07c66126db88e682aced94df450f5 authored by Nicolas Busseneau on 26 April 2023, 17:13:46 UTC, committed by Nicolas Busseneau on 26 April 2023, 17:13:46 UTC
Signed-off-by: Nicolas Busseneau <nicolas@isovalent.com>
1 parent b016532
lock_test.go
// SPDX-License-Identifier: Apache-2.0
// Copyright Authors of Cilium
//go:build !privileged_tests
package lock
import (
"testing"
. "gopkg.in/check.v1"
)
// Hook up gocheck into the "go test" runner.
func Test(t *testing.T) {
TestingT(t)
}
type LockSuite struct{}
var _ = Suite(&LockSuite{})
func (s *LockSuite) TestLock(c *C) {
var lock1 RWMutex
lock1.Lock()
lock1.Unlock()
lock1.RLock()
lock1.RUnlock()
var lock2 Mutex
lock2.Lock()
lock2.Unlock()
}
func (s *LockSuite) TestDebugLock(c *C) {
var lock1 RWMutexDebug
lock1.Lock()
lock1.Unlock()
lock1.RLock()
lock1.RUnlock()
var lock2 MutexDebug
lock2.Lock()
lock2.Unlock()
}
Computing file changes ...