Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
R
rapidjson
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
rapidjson
Commits
86245ce9
Commit
86245ce9
authored
Aug 11, 2014
by
Milo Yip
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove cppformat and strtk
parent
0dbcc1cf
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
0 additions
and
127 deletions
+0
-127
misctest.cpp
test/perftest/misctest.cpp
+0
-127
format.cc
thirdparty/cppformat/format.cc
+0
-0
format.h
thirdparty/cppformat/format.h
+0
-0
strtk.hpp
thirdparty/strtk/strtk.hpp
+0
-0
No files found.
test/perftest/misctest.cpp
View file @
86245ce9
...
...
@@ -25,30 +25,6 @@
#define __STDC_FORMAT_MACROS
#include "rapidjson/stringbuffer.h"
#ifdef _MSC_VER
#pragma warning (push)
#pragma warning (disable: 4996)
#endif
#define strtk_no_tr1_or_boost
#include "strtk/strtk.hpp"
#ifdef _MSC_VER
#pragma warning (pop)
#endif
#ifdef _MSC_VER
#pragma warning (push)
#pragma warning (disable: 4245; disable: 4512; disable: 4996)
#endif
#include "cppformat/format.h"
#include "cppformat/format.cc"
#ifdef _MSC_VER
#pragma warning (pop)
#endif
#define protected public
#include "rapidjson/writer.h"
#undef private
...
...
@@ -1001,107 +977,4 @@ TEST_F(Misc, itoa64_Writer2_InsituStringStream) { itoa64_Writer_InsituStringStre
TEST_F
(
Misc
,
itoa64_Writer3_InsituStringStream
)
{
itoa64_Writer_InsituStringStream
<
Writer3
<
rapidjson
::
InsituStringStream
>
>
();
}
TEST_F
(
Misc
,
itoa64_Writer4_InsituStringStream
)
{
itoa64_Writer_InsituStringStream
<
Writer4
<
rapidjson
::
InsituStringStream
>
>
();
}
TEST_F
(
Misc
,
itoa_sprintf
)
{
size_t
length
=
0
;
for
(
size_t
i
=
0
;
i
<
kItoaTrialCount
;
i
++
)
{
for
(
size_t
j
=
0
;
j
<
randvalCount
;
j
++
)
{
char
buffer
[
32
];
length
+=
sprintf
(
buffer
,
"%d"
,
randval
[
j
]);
}
}
OUTPUT_LENGTH
(
length
);
}
TEST_F
(
Misc
,
itoa64_sprintf
)
{
size_t
length
=
0
;
for
(
size_t
i
=
0
;
i
<
kItoaTrialCount
;
i
++
)
{
for
(
size_t
j
=
0
;
j
<
randvalCount
;
j
++
)
{
char
buffer
[
32
];
int64_t
x
=
randval
[
j
]
*
randval
[
j
];
length
+=
sprintf
(
buffer
,
"%"
PRIi64
,
x
);
}
}
OUTPUT_LENGTH
(
length
);
}
#ifdef _MSC_VER
TEST_F
(
Misc
,
itoa_VC
)
{
size_t
length
=
0
;
for
(
size_t
i
=
0
;
i
<
kItoaTrialCount
;
i
++
)
{
for
(
size_t
j
=
0
;
j
<
randvalCount
;
j
++
)
{
char
buffer
[
32
];
_itoa
(
randval
[
j
],
buffer
,
10
);
length
+=
strlen
(
buffer
);
}
}
OUTPUT_LENGTH
(
length
);
}
TEST_F
(
Misc
,
itoa64_VC
)
{
size_t
length
=
0
;
for
(
size_t
i
=
0
;
i
<
kItoaTrialCount
;
i
++
)
{
for
(
size_t
j
=
0
;
j
<
randvalCount
;
j
++
)
{
char
buffer
[
32
];
_i64toa
(
randval
[
j
]
*
randval
[
j
],
buffer
,
10
);
length
+=
strlen
(
buffer
);
}
}
OUTPUT_LENGTH
(
length
);
}
#endif
TEST_F
(
Misc
,
itoa_strtk
)
{
size_t
length
=
0
;
std
::
string
s
;
s
.
reserve
(
32
);
for
(
size_t
i
=
0
;
i
<
kItoaTrialCount
;
i
++
)
{
for
(
size_t
j
=
0
;
j
<
randvalCount
;
j
++
)
{
s
=
strtk
::
type_to_string
(
randval
[
j
]);
length
+=
s
.
size
();
}
}
OUTPUT_LENGTH
(
length
);
}
TEST_F
(
Misc
,
itoa64_strtk
)
{
size_t
length
=
0
;
std
::
string
s
;
s
.
reserve
(
32
);
for
(
size_t
i
=
0
;
i
<
kItoaTrialCount
;
i
++
)
{
for
(
size_t
j
=
0
;
j
<
randvalCount
;
j
++
)
{
int64_t
x
=
randval
[
j
]
*
randval
[
j
];
s
=
strtk
::
type_to_string
(
x
);
length
+=
s
.
size
();
}
}
OUTPUT_LENGTH
(
length
);
}
TEST_F
(
Misc
,
itoa_cppformat
)
{
size_t
length
=
0
;
char
buffer
[
32
];
for
(
size_t
i
=
0
;
i
<
kItoaTrialCount
;
i
++
)
{
for
(
size_t
j
=
0
;
j
<
randvalCount
;
j
++
)
{
char
*
p
=
buffer
;
fmt
::
FormatDec
(
p
,
randval
[
j
]);
length
+=
(
p
-
buffer
);
}
}
OUTPUT_LENGTH
(
length
);
}
TEST_F
(
Misc
,
itoa64_cppformat
)
{
size_t
length
=
0
;
char
buffer
[
32
];
for
(
size_t
i
=
0
;
i
<
kItoaTrialCount
;
i
++
)
{
for
(
size_t
j
=
0
;
j
<
randvalCount
;
j
++
)
{
char
*
p
=
buffer
;
int64_t
x
=
randval
[
j
]
*
randval
[
j
];
fmt
::
FormatDec
(
p
,
x
);
length
+=
(
p
-
buffer
);
}
}
OUTPUT_LENGTH
(
length
);
}
#endif // TEST_MISC
thirdparty/cppformat/format.cc
deleted
100644 → 0
View file @
0dbcc1cf
This diff is collapsed.
Click to expand it.
thirdparty/cppformat/format.h
deleted
100644 → 0
View file @
0dbcc1cf
This diff is collapsed.
Click to expand it.
thirdparty/strtk/strtk.hpp
deleted
100644 → 0
View file @
0dbcc1cf
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment