summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorTimothee Cour <timothee.cour2@gmail.com>2018-08-06 02:50:42 -0700
committerAndreas Rumpf <rumpf_a@web.de>2018-08-06 11:50:42 +0200
commit8ad59e6857305264a0e415ce995e02b0ab32f770 (patch)
tree1cc129437ee2e4b57c47b24be516cb482825871e
parent6e3d1dced55229309a85849a45c877a798080453 (diff)
downloadNim-8ad59e6857305264a0e415ce995e02b0ab32f770.tar.gz
remove redundant test for nil before `add` (#8460)
-rw-r--r--lib/pure/unittest.nim2
1 files changed, 0 insertions, 2 deletions
diff --git a/lib/pure/unittest.nim b/lib/pure/unittest.nim
index d804ba7c8..aa07a4fa6 100644
--- a/lib/pure/unittest.nim
+++ b/lib/pure/unittest.nim
@@ -525,8 +525,6 @@ proc checkpoint*(msg: string) =
   ##  checkpoint("Checkpoint B")
   ##
   ## outputs "Checkpoint A" once it fails.
-  if checkpoints == nil:
-    checkpoints = @[]
   checkpoints.add(msg)
   # TODO: add support for something like SCOPED_TRACE from Google Test