mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-07-07 20:06:36 +02:00
Code Cleanup
- Removed .gitignore entries for obsolete tests.
This commit is contained in:
parent
d1bc46c355
commit
402ac5b418
2 changed files with 0 additions and 85 deletions
6
test/.gitignore
vendored
6
test/.gitignore
vendored
|
@ -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
|
||||
|
|
|
@ -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 <sys/time.h>
|
||||
#include <Task.h>
|
||||
#include <main.h>
|
||||
#include <test.h>
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue