tdiv.nim 310 B

1234567891011121314151617181920
  1. discard """
  2. targets: "c js"
  3. """
  4. block divUint64:
  5. proc divTest() =
  6. let x1 = 12'u16
  7. let y = x1 div 5'u16
  8. let x2 = 1345567'u32
  9. let z = x2 div 5'u32
  10. let a = 1345567'u64 div uint64(x1)
  11. doAssert y == 2
  12. doAssert z == 269113
  13. doAssert a == 112130
  14. static: divTest()
  15. divTest()