Build using wasi-sdk.

This commit is contained in:
Nuno Cruces
2023-04-14 00:09:40 +01:00
parent 005b15610a
commit c1a640f7d8
15 changed files with 71 additions and 47 deletions

View File

@@ -49,14 +49,18 @@ func TestConn_new(t *testing.T) {
}
defer m.close()
testOOM := func(size uint64) {
t.Run("MaxUint32", func(t *testing.T) {
defer func() { _ = recover() }()
m.new(size)
m.new(math.MaxUint32)
t.Error("want panic")
}
})
testOOM(math.MaxUint32)
testOOM(_MAX_ALLOCATION_SIZE)
t.Run("_MAX_ALLOCATION_SIZE", func(t *testing.T) {
defer func() { _ = recover() }()
m.new(_MAX_ALLOCATION_SIZE)
m.new(_MAX_ALLOCATION_SIZE)
t.Error("want panic")
})
}
func TestConn_newArena(t *testing.T) {