From 402ac5b4187ee02950c00362c651c3e602b25648 Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Mon, 5 Sep 2011 02:10:18 -0400 Subject: [PATCH] Code Cleanup - Removed .gitignore entries for obsolete tests. --- test/.gitignore | 6 ---- test/t.benchmark.t.cpp | 79 ------------------------------------------ 2 files changed, 85 deletions(-) delete mode 100644 test/t.benchmark.t.cpp diff --git a/test/.gitignore b/test/.gitignore index 3bf359b7a..4a47cd114 100644 --- a/test/.gitignore +++ b/test/.gitignore @@ -3,7 +3,6 @@ *.log arguments.t autocomplete.t -cmd.t color.t config.t date.t @@ -11,16 +10,12 @@ directory.t dom.t duration.t file.t -filt.t i18n.t json.t -lexer.t -lisp.t list.t nibbler.t path.t rx.t -sensor.t seq.t subst.t t.t @@ -31,7 +26,6 @@ text.t transport.t uri.t util.t -variant.t view.t json_test diff --git a/test/t.benchmark.t.cpp b/test/t.benchmark.t.cpp deleted file mode 100644 index 78c2f61e4..000000000 --- a/test/t.benchmark.t.cpp +++ /dev/null @@ -1,79 +0,0 @@ -//////////////////////////////////////////////////////////////////////////////// -// taskwarrior - a command line task list manager. -// -// Copyright 2006 - 2011, Paul Beckingham, Federico Hernandez. -// All rights reserved. -// -// This program is free software; you can redistribute it and/or modify it under -// the terms of the GNU General Public License as published by the Free Software -// Foundation; either version 2 of the License, or (at your option) any later -// version. -// -// This program is distributed in the hope that it will be useful, but WITHOUT -// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -// FOR A PARTICULAR PURPOSE. See the GNU General Public License for more -// details. -// -// You should have received a copy of the GNU General Public License along with -// this program; if not, write to the -// -// Free Software Foundation, Inc., -// 51 Franklin Street, Fifth Floor, -// Boston, MA -// 02110-1301 -// USA -// -//////////////////////////////////////////////////////////////////////////////// -#include -#include -#include -#include - -Context context; - -//////////////////////////////////////////////////////////////////////////////// -int main (int argc, char** argv) -{ - UnitTest test (1); - - // FF4 parsing is being tested. Performance of legacy format parsing is - // immaterial. - std::string sample = "[" - "uuid:\"d346065c-7ef6-49af-ae77-19c1825807f5\" " - "status:\"pending\" " - "tags:\"bug,performance,solaris,linux,osx\" " - "due:\"1236142800\" " - "entry:\"1236177552\" " - "priority:\"H\" " - "project:\"task-1.5.0\" " - "start:\"1236231761\" " - "description:\"Profile task and identify performance bottlenecks\"" - "]"; - - // Start clock - test.diag ("start"); - struct timeval start; - gettimeofday (&start, NULL); - - for (int i = 0; i < 1000000; i++) - { - Task t (sample); - } - - // End clock - struct timeval end; - gettimeofday (&end, NULL); - test.diag ("end"); - - int diff = ((end.tv_sec * 1000000) + end.tv_usec) - - ((start.tv_sec * 1000000) + start.tv_usec); - - char s[16]; - sprintf (s, "%d.%06d", diff/1000000, diff%1000000); - test.pass (std::string ("1,000,000 T::parse calls in ") + s + "s"); - - return 0; -} - -//////////////////////////////////////////////////////////////////////////////// -