aboutsummaryrefslogtreecommitdiff
path: root/sqlite3_opt_math_functions_test.go
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2024-08-12 15:42:56 -0300
committerEuAndreh <eu@euandre.org>2024-08-12 15:52:16 -0300
commit6bbc33b9e998af7ee45cca86e1290474603dff48 (patch)
tree5d0aff47783bc20dcf3f7862afdba0445e4c2fae /sqlite3_opt_math_functions_test.go
parentAdd Makefile and build skeleton (diff)
downloadgolite-6bbc33b9e998af7ee45cca86e1290474603dff48.tar.gz
golite-6bbc33b9e998af7ee45cca86e1290474603dff48.tar.xz
Build with "go tool" and hackishly bundle code from same package into one file each
Diffstat (limited to 'sqlite3_opt_math_functions_test.go')
-rw-r--r--sqlite3_opt_math_functions_test.go30
1 files changed, 0 insertions, 30 deletions
diff --git a/sqlite3_opt_math_functions_test.go b/sqlite3_opt_math_functions_test.go
deleted file mode 100644
index 09dbd8d..0000000
--- a/sqlite3_opt_math_functions_test.go
+++ /dev/null
@@ -1,30 +0,0 @@
-//go:build sqlite_math_functions
-// +build sqlite_math_functions
-
-package sqlite3
-
-import (
- "database/sql"
- "testing"
-)
-
-func TestMathFunctions(t *testing.T) {
- db, err := sql.Open("sqlite3", ":memory:")
- if err != nil {
- t.Fatal("Failed to open database:", err)
- }
- defer db.Close()
-
- queries := []string{
- `SELECT acos(1)`,
- `SELECT log(10, 100)`,
- `SELECT power(2, 2)`,
- }
-
- for _, query := range queries {
- var result float64
- if err := db.QueryRow(query).Scan(&result); err != nil {
- t.Errorf("invoking math function query %q: %v", query, err)
- }
- }
-}