Skip to content

Commit

Permalink
Test config.
Browse files Browse the repository at this point in the history
  • Loading branch information
ncruces committed Jun 4, 2024
1 parent d280e0e commit cdbe485
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
1 change: 1 addition & 0 deletions driver/driver_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import (

"github.com/ncruces/go-sqlite3"
_ "github.com/ncruces/go-sqlite3/embed"
_ "github.com/ncruces/go-sqlite3/internal/testcfg"
"github.com/ncruces/go-sqlite3/internal/util"
"github.com/ncruces/go-sqlite3/vfs"
)
Expand Down
1 change: 1 addition & 0 deletions func_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (
"github.com/ncruces/go-sqlite3"
_ "github.com/ncruces/go-sqlite3/embed"
"github.com/ncruces/go-sqlite3/ext/unicode"
_ "github.com/ncruces/go-sqlite3/internal/testcfg"
)

func ExampleConn_CreateCollation() {
Expand Down
9 changes: 6 additions & 3 deletions internal/testcfg/testcfg.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package testcfg

import (
"math/bits"
"os"
"path/filepath"

Expand All @@ -9,9 +10,11 @@ import (
)

func init() {
sqlite3.RuntimeConfig = wazero.NewRuntimeConfig().
WithMemoryCapacityFromMax(true).
WithMemoryLimitPages(1024)
if bits.UintSize >= 64 {
sqlite3.RuntimeConfig = wazero.NewRuntimeConfig().
WithMemoryCapacityFromMax(true).
WithMemoryLimitPages(1024)
}

if os.Getenv("CI") != "" {
path := filepath.Join(os.TempDir(), "wazero")
Expand Down

0 comments on commit cdbe485

Please sign in to comment.