From b01906cd62d5bed5bfcc860504cea6e449234c90 Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Thu, 24 Apr 2014 12:00:50 -0400 Subject: [PATCH] Unit tests - New command line parser is live for DOM access and DOM testing. --- src/Context.cpp | 8 ++------ test/dom.t.cpp | 3 ++- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/src/Context.cpp b/src/Context.cpp index 96ad74c3a..3a9f48211 100644 --- a/src/Context.cpp +++ b/src/Context.cpp @@ -213,12 +213,8 @@ int Context::initialize (int argc, const char** argv) a3.categorize (); a3.dump ("Context::initialize"); - // TODO Uncommenting this breaks unit tests because of the errors it - // generates. - Tree* parseTree = NULL; - //Tree* parseTree = a3t.parse (); - - // Initialize the command line parser. + // Parse the command line. + Tree* parseTree = a3t.parse (); if (parseTree && config.getBoolean ("debug")) debug (parseTree->dump ()); diff --git a/test/dom.t.cpp b/test/dom.t.cpp index 6532dd4fe..86661ea86 100644 --- a/test/dom.t.cpp +++ b/test/dom.t.cpp @@ -45,7 +45,8 @@ int main (int argc, char** argv) try { // Prime the pump. - context.a3.capture ("task"); + const char* fake_argv[] = {"task"}; + context.a3t.initialize (1, fake_argv); DOM dom; t.is (dom.get ("system.version"), VERSION, "DOM system.version -> VERSION");