From d9022188b6391728a4112b3e632744fb3a548569 Mon Sep 17 00:00:00 2001 From: Sébastien Dailly Date: Thu, 26 Dec 2024 21:22:58 +0100 Subject: Updated a test --- tests/sql_int.ml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tests/sql_int.ml b/tests/sql_int.ml index 87b1086..76c25b2 100644 --- a/tests/sql_int.ml +++ b/tests/sql_int.ml @@ -10,17 +10,20 @@ let printer = function let test_suit = [ ( "Int_of_int" >:: fun _ -> - assert_equal (Sqlite3.Data.INT 37354L) + assert_equal ~printer (Sqlite3.Data.INT 37354L) (ImportSQL.Math.int (Sqlite3.Data.INT 37354L)) ); ( "Int_of_string" >:: fun _ -> - assert_equal (Sqlite3.Data.INT 37354L) + assert_equal ~printer (Sqlite3.Data.INT 37354L) (ImportSQL.Math.int (Sqlite3.Data.TEXT "37354")) ); ( "Int_of_string2" >:: fun _ -> assert_equal ~printer (Sqlite3.Data.INT 37354L) (ImportSQL.Math.int (Sqlite3.Data.TEXT "37354.0")) ); ( "Int_of_float" >:: fun _ -> - assert_equal (Sqlite3.Data.INT 37354L) + assert_equal ~printer (Sqlite3.Data.INT 37354L) (ImportSQL.Math.int (Sqlite3.Data.FLOAT 37354.0)) ); + ( "Int_of_Text" >:: fun _ -> + assert_equal ~printer Sqlite3.Data.NULL + (ImportSQL.Math.int (Sqlite3.Data.TEXT "-")) ); ] let tests = "sql_int" >::: test_suit -- cgit v1.2.3