ref #34 time formatting and precision time access
This commit is contained in:
1 parent
732d8f3877
commit
230cb0a067
8 files changed
+108
-14
No files matched your search
@@ -2,6 +2,7 @@ import junit.framework.TestCase.assertEquals
|
||||
import kotlinx.coroutines.runBlocking
|
||||
import net.sergeych.lyng.ModuleScope
|
||||
import net.sergeych.lyng.Source
|
||||
import net.sergeych.lyng.eval
|
||||
import net.sergeych.lyng.pacman.InlineSourcesImportProvider
|
||||
import net.sergeych.lyng.toSource
|
||||
import kotlin.test.Test
|
||||
@@ -37,4 +38,16 @@ class OtherTests {
|
||||
assertEquals("foo1 / bar1", scope.eval(src).toString())
|
||||
}
|
||||
|
||||
@Test
|
||||
fun testInstantTruncation() = runBlocking {
|
||||
eval("""
|
||||
import lyng.time
|
||||
val t1 = Instant()
|
||||
val t2 = Instant()
|
||||
// assert( t1 != t2 )
|
||||
println(t1 - t2)
|
||||
""".trimIndent())
|
||||
Unit
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user