mirror of
https://github.com/status-im/nim-dagger.git
synced 2025-02-28 14:20:36 +00:00
- Update async procedures to use explicit raises annotation - Modify TrackedFutures to handle futures with no raised exceptions - Replace `asyncSpawn` with explicit future tracking - Update test suites to use `unittest2` - Standardize error handling across network and async components - Remove deprecated error handling patterns This commit introduces a more robust approach to async error handling and future management, improving type safety and reducing potential runtime errors.
19 lines
449 B
Nim
19 lines
449 B
Nim
import pkg/unittest2
|
|
|
|
import codex/clock
|
|
import ./helpers
|
|
|
|
suite "Clock":
|
|
proc testConversion(seconds: SecondsSince1970) =
|
|
let asBytes = seconds.toBytes
|
|
|
|
let restored = asBytes.toSecondsSince1970
|
|
|
|
check restored == seconds
|
|
|
|
test "SecondsSince1970 should support bytes conversions":
|
|
let secondsToTest: seq[int64] = @[int64.high, int64.low, 0, 1, 12345, -1, -12345]
|
|
|
|
for seconds in secondsToTest:
|
|
testConversion(seconds)
|