Skip to content
This repository was archived by the owner on Dec 17, 2018. It is now read-only.

Commit 595d281

Browse files
connor rigbyConnorRigby
authored andcommitted
Add some more tests.
1 parent a8553fb commit 595d281

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

erl_test/esqlite_test.erl

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,8 @@ bind_test() ->
8080
esqlite3:step(Statement),
8181
esqlite3:bind(Statement, [{blob, [<<"eleven">>, 0]}, 12]), % iolist bound as blob with trailing eos.
8282
esqlite3:step(Statement),
83+
esqlite3:bind(Statement, ["empty", undefined]), % 'undefined' is converted to SQL null
84+
esqlite3:step(Statement),
8385

8486
%% int64
8587
esqlite3:bind(Statement, [int64, 308553449069486081]),
@@ -106,7 +108,8 @@ bind_test() ->
106108
esqlite3:q("select one, two from test_table where two = 10", Db)),
107109
?assertEqual([{{blob, <<$e,$l,$e,$v,$e,$n,0>>}, 12}],
108110
esqlite3:q("select one, two from test_table where two = 12", Db)),
109-
111+
?assertEqual([{<<"empty">>, undefined}],
112+
esqlite3:q("select one, two from test_table where two is null", Db)),
110113
?assertEqual([{<<"int64">>, 308553449069486081}],
111114
esqlite3:q("select one, two from test_table where one = 'int64';", Db)),
112115
?assertEqual([{<<"negative_int64">>, -308553449069486081}],

0 commit comments

Comments
 (0)