summary refs log blame commit diff stats
path: root/test/test.py
blob: bf285a471be3f1d2df750575f5776d6f10837ea5 (plain) (tree)
1
2
3
4
5




                                                            
"""Workaround to allow running single test cases directly"""
try:
	from __init__ import init, Fake, OK, raise_ok
except:
	from test import init, Fake, OK, raise_ok
w"> = ident(name & "Version") quote do: when not compiles(imp `x`): static: error("Cannot find submodule " & `name` & ".\n" & "Please run `make submodule` to fetch the required submodules.") import `x` as `vs` macro checkVersion(xs: static string, major, minor, patch: int) = let x = ident(xs & "Version") quote do: when `x`.Major < `major` or `x`.Minor < `minor` or `x`.Patch < `patch`: var es = $`major` & "." & $`minor` & "." & $`patch` var gs = $`x`.Major & "." & $`x`.Minor & "." & $`x`.Patch error("Version of " & `xs` & " too low (expected " & es & ", got " & gs & ").\n" & "Please run `make submodule` to update.") tryImport chakasu/version, "chakasu" tryImport chame/version, "chame" static: checkVersion("chakasu", 0, 3, 2) checkVersion("chame", 0, 12, 0)