@@ -51,8 +51,6 @@ RAPIDJSON_DIAG_POP
51
51
52
52
class Schema : public PerfTest {
53
53
public:
54
- typedef GenericSchemaDocument<Value, MemoryPoolAllocator<> > SchemaDocumentType;
55
-
56
54
Schema () {}
57
55
58
56
virtual void SetUp () {
@@ -91,8 +89,6 @@ class Schema : public PerfTest {
91
89
92
90
char jsonBuffer[65536 ];
93
91
MemoryPoolAllocator<> jsonAllocator (jsonBuffer, sizeof (jsonBuffer));
94
- char schemaBuffer[65536 ];
95
- MemoryPoolAllocator<> schemaAllocator (schemaBuffer, sizeof (schemaBuffer));
96
92
97
93
for (size_t i = 0 ; i < ARRAY_SIZE (filenames); i++) {
98
94
char filename[FILENAME_MAX];
@@ -116,7 +112,7 @@ class Schema : public PerfTest {
116
112
continue ;
117
113
118
114
TestSuite* ts = new TestSuite;
119
- ts->schema = new SchemaDocumentType ((*schemaItr)[" schema" ], 0 , 0 , 0 , &schemaAllocator );
115
+ ts->schema = new SchemaDocument ((*schemaItr)[" schema" ]);
120
116
121
117
const Value& tests = (*schemaItr)[" tests" ];
122
118
for (Value::ConstValueIterator testItr = tests.Begin (); testItr != tests.End (); ++testItr) {
@@ -191,7 +187,7 @@ class Schema : public PerfTest {
191
187
for (DocumentList::iterator itr = tests.begin (); itr != tests.end (); ++itr)
192
188
delete *itr;
193
189
}
194
- SchemaDocumentType * schema;
190
+ SchemaDocument * schema;
195
191
DocumentList tests;
196
192
};
197
193
@@ -210,7 +206,7 @@ TEST_F(Schema, TestSuite) {
210
206
for (int i = 0 ; i < trialCount; i++) {
211
207
for (TestSuiteList::const_iterator itr = testSuites.begin (); itr != testSuites.end (); ++itr) {
212
208
const TestSuite& ts = **itr;
213
- GenericSchemaValidator<SchemaDocumentType , BaseReaderHandler<UTF8<> >, MemoryPoolAllocator<> > validator (*ts.schema , &validatorAllocator);
209
+ GenericSchemaValidator<SchemaDocument , BaseReaderHandler<UTF8<> >, MemoryPoolAllocator<> > validator (*ts.schema , &validatorAllocator);
214
210
for (DocumentList::const_iterator testItr = ts.tests .begin (); testItr != ts.tests .end (); ++testItr) {
215
211
validator.Reset ();
216
212
(*testItr)->Accept (validator);
0 commit comments