Skip to content

Commit df7f9d4

Browse files
committed
refactor: remove unnecessary assert method from tests
1 parent 4ce0c13 commit df7f9d4

File tree

1 file changed

+7
-16
lines changed

1 file changed

+7
-16
lines changed

Tests/Sqlite.lean

Lines changed: 7 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,7 @@ open LSpec
55
open Sqlite.FFI
66
open Sqlite.FFI.Constants
77

8-
def assert := (· = true)
9-
10-
instance : Testable (assert b) :=
8+
instance (b : Bool) : Testable b :=
119
if h : b = true then
1210
.isTrue h
1311
else
@@ -95,17 +93,10 @@ def testNonExistentTable (ctx : TestContext) : IO Bool := do
9593
| Except.ok _ => pure false
9694

9795
def main := do
98-
let insertData ← (withTest testInsertData)
99-
let selectData ← (withTest testSelectData)
100-
let parameterBinding ← (withTest testParameterBinding)
101-
let columnCount ← (withTest testColumnCount)
102-
let invalidSyntax ← (withTest testInvalidSyntax)
103-
let nonExistentTable ← (withTest testNonExistentTable)
104-
10596
lspecIO $
106-
test "can insert data" (assert insertData) $
107-
test "can select data" (assert selectData) $
108-
test "can bind parameters" (assert parameterBinding) $
109-
test "can get column count" (assert columnCount) $
110-
test "handles invalid SQL syntax" (assert invalidSyntax) $
111-
test "handles non-existent table" (assert nonExistentTable)
97+
test "can insert data" (← withTest testInsertData) $
98+
test "can select data" (← withTest testSelectData) $
99+
test "can bind parameters" (← withTest testParameterBinding) $
100+
test "can get column count" (← withTest testColumnCount) $
101+
test "handles invalid SQL syntax" (← withTest testInvalidSyntax) $
102+
test "handles non-existent table" (← withTest testNonExistentTable)

0 commit comments

Comments
 (0)