From f1d61e6748306e772581770bb2ae805447e59f19 Mon Sep 17 00:00:00 2001
From: toole1 <toole1@6fbd10e7-183d-0410-a318-cb416676e4f2>
Date: Sat, 23 Jul 2011 06:17:06 +0000
Subject: [PATCH] or this

git-svn-id: https://subversion.cs.illinois.edu/svn/cs225@3379 6fbd10e7-183d-0410-a318-cb416676e4f2
---
 proxy.cpp | 12 +++---------
 proxy.h   | 17 ++---------------
 2 files changed, 5 insertions(+), 24 deletions(-)

diff --git a/proxy.cpp b/proxy.cpp
index 4c6ee3f..03dbfa0 100755
--- a/proxy.cpp
+++ b/proxy.cpp
@@ -238,7 +238,7 @@ int32_t RunTests::run_single_test(unit_test & curr_test)
 	cout << "Running " << curr_test.name << " [worth "
 		 << curr_test.points << " points, output below]" << endl;
 
-	bool is_parent_process = UnitTestContainer(curr_test, environment).execute(false);
+	bool is_parent_process = execute_test(curr_test, environment, false);
 	if (!is_parent_process)
 		return environment.cleanup_globals();
 
@@ -289,7 +289,7 @@ int RunTests::run_all_tests()
 		unit_test & curr_test = tests[test_i];
 		output::testname(curr_test, max_testname_len, max_points_len);
 
-		bool is_parent_process = UnitTestContainer(curr_test, environment).execute(true);
+		bool is_parent_process = execute_test(curr_test, environment, true);
 		// Check for the child process
 		// This is unfortunately necessary (instead of an exit) to clean up
 		// all the memory in use in main and the global space for valgrind
@@ -458,7 +458,7 @@ void test_execution::aborted_exit()
 }
 
 
-bool UnitTestContainer::execute(bool enable_valgrind_call)
+bool RunTests::execute_test(unit_test & _test, RunTimeEnvironment & environment, bool enable_valgrind_call)
 {
 	cout << std::flush;
 	test_execution executor(test, environment, enable_valgrind_call);
@@ -680,11 +680,5 @@ long test_execution::end_timeout()
 
 
 
-UnitTestContainer::UnitTestContainer(unit_test & _test, RunTimeEnvironment & env)
-	: environment(env), test(_test) { }
-
-
-	
-
 } // namespace proxy
 
diff --git a/proxy.h b/proxy.h
index 15320b4..461437f 100755
--- a/proxy.h
+++ b/proxy.h
@@ -106,26 +106,13 @@ namespace proxy
 		void output_detailed_info_if_any_failed(int32_t score);
 		void output_detailed_tests_info(int32_t score);
 
+		execute_test(unit_test & _test, RunTimeEnvironment & env, bool enable_valgrind_call);
+
 		private:
 		RunTests(const RunTests & other);
 		RunTests & operator=(const RunTests & other);
 	};
 
-	class UnitTestContainer
-	{
-		private:
-		RunTimeEnvironment & environment;
-		unit_test & test;
-		
-		public:
-		UnitTestContainer(unit_test & _test, RunTimeEnvironment & env);
-		bool execute(bool enable_valgrind_call);
-		
-		private:
-		UnitTestContainer(const UnitTestContainer & other);
-		UnitTestContainer & operator=(const UnitTestContainer & other);
-	};
-
 	template <typename F>
 	bool fork_execute(F & executor);
 	
-- 
GitLab