when ismain

This commit is contained in:
Antonis Geralis 2022-09-05 19:53:07 +03:00
parent 2c77490357
commit 784e88319f
3 changed files with 30 additions and 26 deletions

View File

@ -35,6 +35,7 @@ proc `$`(n: HtmlNode): string =
result = newStringOfCap(1000)
toString n, result
when isMainModule:
import drchaos
proc default(_: typedesc[HtmlNode]): HtmlNode =

View File

@ -44,8 +44,11 @@ proc eye*(N: static[int], A: typedesc[float32], order: OrderType = colMajor): Ma
for i in 0 ..< N:
result.data[i + N * i] = 1'f32
when isMainModule:
import drchaos
{.experimental: "strictFuncs".}
proc default[M, N: static[int]](_: typedesc[Matrix32[M, N]]): Matrix32[M, N] =
zeros(M, N, float32)

View File

@ -8,6 +8,6 @@
@end
--passC: "-fsanitize=address,undefined"
--passL: "-fsanitize=address,undefined"
#--define: release
#--define: danger
--debugger: native
--path: "../"