Added a negative number test.

This commit is contained in:
Maas-Maarten Zeeman
2013-03-09 11:38:16 +01:00
parent 6554965570
commit ad2fbcdfce

View File

@@ -75,6 +75,11 @@ bind_test() ->
esqlite3:bind(Statement, [int64, 308553449069486081]),
esqlite3:step(Statement),
%% negative int64
esqlite3:bind(Statement, [negative_int64, -308553449069486081]),
esqlite3:step(Statement),
%% utf-8
esqlite3:bind(Statement, [[<<228,184,138,230,181,183>>], 100]),
esqlite3:step(Statement),
@@ -92,9 +97,10 @@ bind_test() ->
?assertEqual([{{blob, <<$e,$l,$e,$v,$e,$n,0>>}, 12}],
esqlite3:q("select one, two from test_table where two = 12", Db)),
%% int64
?assertEqual([{<<"int64">>, 308553449069486081}],
esqlite3:q("select one, two from test_table where one = 'int64';", Db)),
?assertEqual([{<<"negative_int64">>, -308553449069486081}],
esqlite3:q("select one, two from test_table where one = 'negative_int64';", Db)),
%% utf-8
?assertEqual([{<<228,184,138,230,181,183>>, 100}],