OSDN Git Service
(root)
/
pf3gnuchains
/
gcc-fork.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Update to current version of Go library (revision 94d654be2064).
[pf3gnuchains/gcc-fork.git]
/
libgo
/
go
/
sync
/
mutex_test.go
diff --git
a/libgo/go/sync/mutex_test.go
b/libgo/go/sync/mutex_test.go
index
d0e048e
..
f5c20ca
100644
(file)
--- a/
libgo/go/sync/mutex_test.go
+++ b/
libgo/go/sync/mutex_test.go
@@
-89,3
+89,16
@@
func BenchmarkContendedMutex(b *testing.B) {
<-c
<-c
}
+
+func TestMutexPanic(t *testing.T) {
+ defer func() {
+ if recover() == nil {
+ t.Fatalf("unlock of unlocked mutex did not panic")
+ }
+ }()
+
+ var mu Mutex
+ mu.Lock()
+ mu.Unlock()
+ mu.Unlock()
+}