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 4b59b97
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 0 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
5 changes: 5 additions & 0 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,6 +10,10 @@ import (
)

func init() {
if bits.UintSize < 64 {
return
}

sqlite3.RuntimeConfig = wazero.NewRuntimeConfig().
WithMemoryCapacityFromMax(true).
WithMemoryLimitPages(1024)
Expand Down
4 changes: 4 additions & 0 deletions tests/stmt_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package tests
import (
"encoding/json"
"math"
"math/bits"
"testing"
"time"

Expand Down Expand Up @@ -617,6 +618,9 @@ func TestStmt_ColumnTime(t *testing.T) {
}

func TestStmt_Error(t *testing.T) {
if bits.UintSize < 64 {
t.Skip("skipping on 32-bit")
}
t.Parallel()

db, err := sqlite3.Open(":memory:")
Expand Down

0 comments on commit 4b59b97

Please sign in to comment.