Deleting a parsed Command in the interactive_shell_black test.
authorTim King <taking@google.com>
Sun, 13 Nov 2016 08:33:40 +0000 (00:33 -0800)
committerTim King <taking@google.com>
Sun, 13 Nov 2016 08:33:40 +0000 (00:33 -0800)
test/unit/main/interactive_shell_black.h

index 9ac81781cb7f76933251a24861b9160cbbfde102..5e9d43dd46cbe891a2bd1e62dd63f5fb72299288 100644 (file)
@@ -26,6 +26,7 @@
 #include "options/language.h"
 #include "options/options.h"
 #include "parser/parser_builder.h"
+#include "smt/command.h"
 
 using namespace CVC4;
 using namespace std;
@@ -97,9 +98,10 @@ private:
     InteractiveShell shell(*d_exprManager, d_options);
     /* readCommand may return a sequence, see above. */
     *d_sin << "x : REAL;\n" << flush;
-    shell.readCommand();
+    Command* tmp = shell.readCommand();
     *d_sin << "ASSERT x > 0;\n" << flush;
     countCommands( shell, 1, 1 );
+    delete tmp;
   }
 
   void testEmptyLine() {