Skip to content

Commit

Permalink
failing test
Browse files Browse the repository at this point in the history
  • Loading branch information
mabrek committed Nov 26, 2011
1 parent acc0171 commit 79d33a2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion test_src/pgsql_tests.erl
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,7 @@ date_time_type_test() ->
check_type(timetz, "'00:01:02-01'", {{0,1,2.0},1*60*60},
[{{0,0,0.0},0}, {{24,0,0.0},-13*60*60}]),
check_type(timestamp, "'2008-01-02 03:04:05'", {{2008,1,2},{3,4,5.0}},
[{{-4712,1,1},{0,0,0.0}}, {{MaxTsDate,12,31}, {23,59,59.0}}]),
[{{-4712,1,1},{0,0,0.0}}, {{MaxTsDate,12,31}, {23,59,59.0}}, {1322,334285,440966}]),
check_type(interval, "'1 hour 2 minutes 3.1 seconds'", {{1,2,3.1},0,0},
[{{0,0,0.0},0,-178000000 * 12}, {{0,0,0.0},0,178000000 * 12}])
end).
Expand Down Expand Up @@ -647,6 +647,7 @@ check_type(Type, In, Out, Values, Column) ->
compare(_Type, null, null) -> true;
compare(float4, V1, V2) -> abs(V2 - V1) < 0.000001;
compare(float8, V1, V2) -> abs(V2 - V1) < 0.000000000000001;
compare(timestamp, V1 = {_,_,_}, V2) -> calendar:now_to_local_time(V1) =:= V2;
compare(_Type, V1, V2) -> V1 =:= V2.

%% flush mailbox
Expand Down

0 comments on commit 79d33a2

Please sign in to comment.