From 48169847265e13d3b12d670230ad6d33a9d384cc Mon Sep 17 00:00:00 2001 From: Juan Carlos Date: Wed, 1 Apr 2020 14:39:58 -0300 Subject: Documentation, add more examples (#13825) --- lib/system/assertions.nim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/system') diff --git a/lib/system/assertions.nim b/lib/system/assertions.nim index 13836a540..64ed44ea7 100644 --- a/lib/system/assertions.nim +++ b/lib/system/assertions.nim @@ -50,7 +50,7 @@ template assert*(cond: untyped, msg = "") = ## `command line switches `_. ## ## .. code-block:: nim - ## static: assert 1 == 9, "This works when not built with -d:danger or --assertions:off" + ## static: assert 1 == 9, "This assertion generates code when not built with -d:danger or --assertions:off" const expr = astToStr(cond) assertImpl(cond, msg, expr, compileOption("assertions")) @@ -58,7 +58,7 @@ template doAssert*(cond: untyped, msg = "") = ## Similar to ``assert`` but is always turned on regardless of ``--assertions``. ## ## .. code-block:: nim - ## static: assert 1 == 9, "This works when built with/without -d:danger or --assertions:off" + ## static: doAssert 1 == 9, "This assertion generates code when built with/without -d:danger or --assertions:off" const expr = astToStr(cond) assertImpl(cond, msg, expr, true) -- cgit 1.4.1-2-gfad0