diff options
author | Li Haoyi <haoyi@dropbox.com> | 2014-11-09 23:11:06 -0800 |
---|---|---|
committer | Li Haoyi <haoyi@dropbox.com> | 2014-11-09 23:11:06 -0800 |
commit | aaea4afbf3b47d623f396cb1eae247fa92053032 (patch) | |
tree | d462a508e545d5ec3637557b632cd0b7366e56cd /examples/crossBuilds/simple2/js/shared/test/scala/simple/SimpleTest.scala | |
parent | 52306f10ce3d1e462b171688de04b37174c0b74a (diff) | |
download | hands-on-scala-js-aaea4afbf3b47d623f396cb1eae247fa92053032.tar.gz hands-on-scala-js-aaea4afbf3b47d623f396cb1eae247fa92053032.tar.bz2 hands-on-scala-js-aaea4afbf3b47d623f396cb1eae247fa92053032.zip |
.
Diffstat (limited to 'examples/crossBuilds/simple2/js/shared/test/scala/simple/SimpleTest.scala')
-rw-r--r-- | examples/crossBuilds/simple2/js/shared/test/scala/simple/SimpleTest.scala | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/examples/crossBuilds/simple2/js/shared/test/scala/simple/SimpleTest.scala b/examples/crossBuilds/simple2/js/shared/test/scala/simple/SimpleTest.scala index ec6b29f..b348c6f 100644 --- a/examples/crossBuilds/simple2/js/shared/test/scala/simple/SimpleTest.scala +++ b/examples/crossBuilds/simple2/js/shared/test/scala/simple/SimpleTest.scala @@ -5,9 +5,16 @@ import utest._ object SimpleTest extends TestSuite{ val tests = TestSuite{ 'format{ - 'nil - assert(Simple.formatTimes(Nil) == "") - 'timeZero - assert( - Simple.formatTimes(Seq(0)) == "December 31, 1969 4:00:00 PM PST") - } + 'nil - assert(Simple.formatTimes(Nil) == Nil) + 'timeZero - { + val timestamps = Seq(0L, 1L << 32) + val expected = Seq( + "1970-01-01T00:00:00", + "1970-02-19T17:02:47" + ) + val formatted = Simple.formatTimes(timestamps) + assert(formatted == expected) + } + } } }
\ No newline at end of file |