summaryrefslogtreecommitdiffstatshomepage
path: root/3rdparty/rapidjson/test/unittest/fwdtest.cpp
diff options
context:
space:
mode:
Diffstat (limited to '3rdparty/rapidjson/test/unittest/fwdtest.cpp')
-rw-r--r--3rdparty/rapidjson/test/unittest/fwdtest.cpp27
1 files changed, 15 insertions, 12 deletions
diff --git a/3rdparty/rapidjson/test/unittest/fwdtest.cpp b/3rdparty/rapidjson/test/unittest/fwdtest.cpp
index 4f326846116..e9c707805a5 100644
--- a/3rdparty/rapidjson/test/unittest/fwdtest.cpp
+++ b/3rdparty/rapidjson/test/unittest/fwdtest.cpp
@@ -1,6 +1,6 @@
// Tencent is pleased to support the open source community by making RapidJSON available.
//
-// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. All rights reserved.
+// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip.
//
// Licensed under the MIT License (the "License"); you may not use this file except
// in compliance with the License. You may obtain a copy of the License at
@@ -100,6 +100,9 @@ struct Foo {
#include "rapidjson/prettywriter.h"
#include "rapidjson/schema.h" // -> pointer.h
+typedef Transcoder<UTF8<>, UTF8<> > TranscoderUtf8ToUtf8;
+typedef BaseReaderHandler<UTF8<>, void> BaseReaderHandlerUtf8Void;
+
Foo::Foo() :
// encodings.h
utf8(RAPIDJSON_NEW(UTF8<>)),
@@ -111,40 +114,40 @@ Foo::Foo() :
utf32le(RAPIDJSON_NEW(UTF32LE<>)),
ascii(RAPIDJSON_NEW(ASCII<>)),
autoutf(RAPIDJSON_NEW(AutoUTF<unsigned>)),
- transcoder(RAPIDJSON_NEW((Transcoder<UTF8<>, UTF8<> >))),
+ transcoder(RAPIDJSON_NEW(TranscoderUtf8ToUtf8)),
// allocators.h
crtallocator(RAPIDJSON_NEW(CrtAllocator)),
memorypoolallocator(RAPIDJSON_NEW(MemoryPoolAllocator<>)),
// stream.h
- stringstream(RAPIDJSON_NEW(StringStream(0))),
- insitustringstream(RAPIDJSON_NEW(InsituStringStream(0))),
+ stringstream(RAPIDJSON_NEW(StringStream)(NULL)),
+ insitustringstream(RAPIDJSON_NEW(InsituStringStream)(NULL)),
// stringbuffer.h
stringbuffer(RAPIDJSON_NEW(StringBuffer)),
// // filereadstream.h
- // filereadstream(RAPIDJSON_NEW(FileReadStream(stdout, buffer, sizeof(buffer)))),
+ // filereadstream(RAPIDJSON_NEW(FileReadStream)(stdout, buffer, sizeof(buffer))),
// // filewritestream.h
- // filewritestream(RAPIDJSON_NEW(FileWriteStream(stdout, buffer, sizeof(buffer)))),
+ // filewritestream(RAPIDJSON_NEW(FileWriteStream)(stdout, buffer, sizeof(buffer))),
// memorybuffer.h
memorybuffer(RAPIDJSON_NEW(MemoryBuffer)),
// memorystream.h
- memorystream(RAPIDJSON_NEW(MemoryStream(0, 0))),
+ memorystream(RAPIDJSON_NEW(MemoryStream)(NULL, 0)),
// reader.h
- basereaderhandler(RAPIDJSON_NEW((BaseReaderHandler<UTF8<>, void>))),
+ basereaderhandler(RAPIDJSON_NEW(BaseReaderHandlerUtf8Void)),
reader(RAPIDJSON_NEW(Reader)),
// writer.h
- writer(RAPIDJSON_NEW((Writer<StringBuffer>))),
+ writer(RAPIDJSON_NEW(Writer<StringBuffer>)),
// prettywriter.h
- prettywriter(RAPIDJSON_NEW((PrettyWriter<StringBuffer>))),
+ prettywriter(RAPIDJSON_NEW(PrettyWriter<StringBuffer>)),
// document.h
value(RAPIDJSON_NEW(Value)),
@@ -154,8 +157,8 @@ Foo::Foo() :
pointer(RAPIDJSON_NEW(Pointer)),
// schema.h
- schemadocument(RAPIDJSON_NEW(SchemaDocument(*document))),
- schemavalidator(RAPIDJSON_NEW(SchemaValidator(*schemadocument)))
+ schemadocument(RAPIDJSON_NEW(SchemaDocument)(*document)),
+ schemavalidator(RAPIDJSON_NEW(SchemaValidator)(*schemadocument))
{
}