TestErrAllocaCStr

This commit is contained in:
xushiwei
2024-05-09 06:55:07 +08:00
parent 2b70bb60a9
commit a13d9a92bd

View File

@@ -100,6 +100,16 @@ func TestErrAlloca(t *testing.T) {
ctx.alloca(nil, nil) ctx.alloca(nil, nil)
} }
func TestErrAllocaCStr(t *testing.T) {
defer func() {
if r := recover(); r == nil {
t.Fatal("allocaCStr: no error?")
}
}()
var ctx context
ctx.allocaCStr(nil, nil)
}
func TestCStrNoArgs(t *testing.T) { func TestCStrNoArgs(t *testing.T) {
defer func() { defer func() {
if r := recover(); r == nil { if r := recover(); r == nil {