Memory management.

This commit is contained in:
Nuno Cruces
2024-09-09 13:21:33 +01:00
parent c1915feb2e
commit 9d77322d50
13 changed files with 64 additions and 70 deletions

View File

@@ -3,7 +3,6 @@ package sqlite3
import (
"bytes"
"math"
"os"
"testing"
"github.com/ncruces/go-sqlite3/internal/util"
@@ -39,7 +38,7 @@ func Test_sqlite_call_closed(t *testing.T) {
sqlite.close()
defer func() { _ = recover() }()
sqlite.call("free")
sqlite.call("sqlite3_free")
t.Error("want panic")
}
@@ -57,19 +56,6 @@ func Test_sqlite_new(t *testing.T) {
sqlite.new(math.MaxUint32)
t.Error("want panic")
})
t.Run("_MAX_ALLOCATION_SIZE", func(t *testing.T) {
if testing.Short() {
t.Skip("skipping in short mode")
}
if os.Getenv("CI") != "" {
t.Skip("skipping in CI")
}
defer func() { _ = recover() }()
sqlite.new(_MAX_ALLOCATION_SIZE)
sqlite.new(_MAX_ALLOCATION_SIZE)
t.Error("want panic")
})
}
func Test_sqlite_newArena(t *testing.T) {