From 7a5e26ffc232b8a54a3914ace565c43abf9bd4b4 Mon Sep 17 00:00:00 2001 From: Danny Robson Date: Fri, 30 Jan 2015 16:46:47 +1100 Subject: [PATCH] options: reset processor for each test eliminates errors when CHECK macros are disabled in release builds --- test/options.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/test/options.cpp b/test/options.cpp index af38445c..50f59c2e 100644 --- a/test/options.cpp +++ b/test/options.cpp @@ -210,9 +210,8 @@ test_bytes_opt(void) { void test_insert_remove_opt (void) { - unique_ptr p(new processor ()); - { + unique_ptr p(new processor ()); auto opt = make_unique ('n', "null-option", "null testing action"); auto cmp = opt.get (); p->add_option (move (opt)); @@ -220,6 +219,7 @@ test_insert_remove_opt (void) { } { + unique_ptr p(new processor ()); auto opt = make_unique ('n', "null-option", "null testing action"); auto cmp = opt.get (); p->add_option (move (opt)); @@ -227,6 +227,7 @@ test_insert_remove_opt (void) { } { + unique_ptr p(new processor ()); auto opt1 = make_unique ('n', "null-option", "null testing action"); auto opt2 = make_unique ('n', "null-option", "null testing action"); p->add_option (move (opt1));