Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100755 19 lines (14 sloc) 0.563 kb
41a2260 @trung test cases for read/write amf0
authored
1 -module(utils_test).
2 -author("trung@mdkt.org").
3
4 -include_lib("eunit/include/eunit.hrl").
5
6 -compile(export_all).
7
8 milliseconds_to_date_test() ->
9 Milli = 1254730491959,
10 ExpectedDate = {{2009, 10, 05}, {16, 14, 51}},
11 ActualDate = utils:milliseconds_to_date(Milli),
12 ?assertEqual(ExpectedDate, ActualDate).
13
14 date_to_milliseconds_test() ->
15 ExpectedMilli = (1254730491959 div 1000) * 1000,
16 Date = {{2009, 10, 05}, {16, 14, 51}},
17 ActualMilli = utils:date_to_milliseconds(Date),
18 ?assertEqual(ExpectedMilli, ActualMilli).
Something went wrong with that request. Please try again.