diff options
Diffstat (limited to 'graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest')
26 files changed, 167 insertions, 167 deletions
diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/allocatorstest.cpp b/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/allocatorstest.cpp index 2ffc325426..4f08cad48e 100644 --- a/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/allocatorstest.cpp +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/allocatorstest.cpp @@ -1,5 +1,5 @@ // 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. // // Licensed under the MIT License (the "License"); you may not use this file except @@ -7,9 +7,9 @@ // // http://opensource.org/licenses/MIT // -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the +// Unless required by applicable law or agreed to in writing, software distributed +// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +// CONDITIONS OF ANY KIND, either express or implied. See the License for the // specific language governing permissions and limitations under the License. #include "unittest.h" diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/bigintegertest.cpp b/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/bigintegertest.cpp index fad54382ca..b448b4dce2 100644 --- a/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/bigintegertest.cpp +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/bigintegertest.cpp @@ -1,5 +1,5 @@ // 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. // // Licensed under the MIT License (the "License"); you may not use this file except @@ -7,9 +7,9 @@ // // http://opensource.org/licenses/MIT // -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the +// Unless required by applicable law or agreed to in writing, software distributed +// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +// CONDITIONS OF ANY KIND, either express or implied. See the License for the // specific language governing permissions and limitations under the License. #include "unittest.h" diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/clzlltest.cpp b/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/clzlltest.cpp index ad465e1f31..3e9cfc2415 100644 --- a/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/clzlltest.cpp +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/clzlltest.cpp @@ -1,5 +1,5 @@ // 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. // // Licensed under the MIT License (the "License"); you may not use this file except @@ -7,9 +7,9 @@ // // http://opensource.org/licenses/MIT // -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the +// Unless required by applicable law or agreed to in writing, software distributed +// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +// CONDITIONS OF ANY KIND, either express or implied. See the License for the // specific language governing permissions and limitations under the License. #include "unittest.h" diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/documenttest.cpp b/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/documenttest.cpp index c3d1e484dc..74432ba39a 100644 --- a/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/documenttest.cpp +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/documenttest.cpp @@ -1,5 +1,5 @@ // 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. // // Licensed under the MIT License (the "License"); you may not use this file except @@ -7,9 +7,9 @@ // // http://opensource.org/licenses/MIT // -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the +// Unless required by applicable law or agreed to in writing, software distributed +// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +// CONDITIONS OF ANY KIND, either express or implied. See the License for the // specific language governing permissions and limitations under the License. #include "unittest.h" @@ -176,7 +176,7 @@ TEST(Document, Parse_Encoding) { typedef GenericDocument<UTF16<> > DocumentType; DocumentType doc; - + // Parse<unsigned, SourceEncoding>(const SourceEncoding::Ch*) // doc.Parse<kParseDefaultFlags, UTF8<> >(json); // EXPECT_FALSE(doc.HasParseError()); diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/dtoatest.cpp b/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/dtoatest.cpp index 3ec8982898..69e2256b6c 100644 --- a/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/dtoatest.cpp +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/dtoatest.cpp @@ -1,5 +1,5 @@ // 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. // // Licensed under the MIT License (the "License"); you may not use this file except @@ -7,9 +7,9 @@ // // http://opensource.org/licenses/MIT // -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the +// Unless required by applicable law or agreed to in writing, software distributed +// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +// CONDITIONS OF ANY KIND, either express or implied. See the License for the // specific language governing permissions and limitations under the License. #include "unittest.h" diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/encodedstreamtest.cpp b/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/encodedstreamtest.cpp index d9b87e94cd..52e5040bb0 100644 --- a/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/encodedstreamtest.cpp +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/encodedstreamtest.cpp @@ -1,5 +1,5 @@ // 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. // // Licensed under the MIT License (the "License"); you may not use this file except @@ -7,9 +7,9 @@ // // http://opensource.org/licenses/MIT // -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the +// Unless required by applicable law or agreed to in writing, software distributed +// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +// CONDITIONS OF ANY KIND, either express or implied. See the License for the // specific language governing permissions and limitations under the License. #include "unittest.h" @@ -39,7 +39,7 @@ public: private: EncodedStreamTest(const EncodedStreamTest&); EncodedStreamTest& operator=(const EncodedStreamTest&); - + protected: static FILE* Open(const char* filename) { const char *paths[] = { diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/encodingstest.cpp b/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/encodingstest.cpp index 455881e7e8..ab0175a780 100644 --- a/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/encodingstest.cpp +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/encodingstest.cpp @@ -1,5 +1,5 @@ // 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. // // Licensed under the MIT License (the "License"); you may not use this file except @@ -7,9 +7,9 @@ // // http://opensource.org/licenses/MIT // -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the +// Unless required by applicable law or agreed to in writing, software distributed +// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +// CONDITIONS OF ANY KIND, either express or implied. See the License for the // specific language governing permissions and limitations under the License. #include "unittest.h" @@ -259,7 +259,7 @@ static const unsigned char utf8d[] = { 12, 0,12,12,12,12,12, 0,12, 0,12,12, 12,24,12,12,12,12,12,24,12,24,12,12, 12,12,12,12,12,12,12,24,12,12,12,12, 12,24,12,12,12,12,12,12,12,24,12,12, 12,12,12,12,12,12,12,36,12,36,12,12, 12,36,12,12,12,12,12,36,12,36,12,12, - 12,36,12,12,12,12,12,12,12,12,12,12, + 12,36,12,12,12,12,12,12,12,12,12,12, }; static unsigned inline decode(unsigned* state, unsigned* codep, unsigned byte) { @@ -377,7 +377,7 @@ TEST(EncodingsTest, UTF16) { unsigned decodedCodepoint; bool result = UTF16<>::Decode(is, &decodedCodepoint); EXPECT_TRUE(result); - EXPECT_EQ(codepoint, decodedCodepoint); + EXPECT_EQ(codepoint, decodedCodepoint); if (!result || codepoint != decodedCodepoint) std::cout << std::hex << codepoint << " " << decodedCodepoint << std::endl; } @@ -408,7 +408,7 @@ TEST(EncodingsTest, UTF32) { unsigned decodedCodepoint; bool result = UTF32<>::Decode(is, &decodedCodepoint); EXPECT_TRUE(result); - EXPECT_EQ(codepoint, decodedCodepoint); + EXPECT_EQ(codepoint, decodedCodepoint); if (!result || codepoint != decodedCodepoint) std::cout << std::hex << codepoint << " " << decodedCodepoint << std::endl; } diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/filestreamtest.cpp b/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/filestreamtest.cpp index de0b4d1a4a..34da56cef8 100644 --- a/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/filestreamtest.cpp +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/filestreamtest.cpp @@ -1,5 +1,5 @@ // 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. // // Licensed under the MIT License (the "License"); you may not use this file except @@ -7,9 +7,9 @@ // // http://opensource.org/licenses/MIT // -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the +// Unless required by applicable law or agreed to in writing, software distributed +// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +// CONDITIONS OF ANY KIND, either express or implied. See the License for the // specific language governing permissions and limitations under the License. #include "unittest.h" @@ -77,7 +77,7 @@ public: private: FileStreamTest(const FileStreamTest&); FileStreamTest& operator=(const FileStreamTest&); - + protected: const char* filename_; char *json_; diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/fwdtest.cpp b/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/fwdtest.cpp index e9c707805a..62ab5a0344 100644 --- a/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/fwdtest.cpp +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/fwdtest.cpp @@ -1,5 +1,5 @@ // 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. // // Licensed under the MIT License (the "License"); you may not use this file except @@ -7,9 +7,9 @@ // // http://opensource.org/licenses/MIT // -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the +// Unless required by applicable law or agreed to in writing, software distributed +// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +// CONDITIONS OF ANY KIND, either express or implied. See the License for the // specific language governing permissions and limitations under the License. #include "unittest.h" @@ -103,7 +103,7 @@ struct Foo { typedef Transcoder<UTF8<>, UTF8<> > TranscoderUtf8ToUtf8; typedef BaseReaderHandler<UTF8<>, void> BaseReaderHandlerUtf8Void; -Foo::Foo() : +Foo::Foo() : // encodings.h utf8(RAPIDJSON_NEW(UTF8<>)), utf16(RAPIDJSON_NEW(UTF16<>)), diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/istreamwrappertest.cpp b/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/istreamwrappertest.cpp index f0cdb2d38c..57634caf4d 100644 --- a/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/istreamwrappertest.cpp +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/istreamwrappertest.cpp @@ -1,5 +1,5 @@ // 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. // // Licensed under the MIT License (the "License"); you may not use this file except @@ -7,9 +7,9 @@ // // http://opensource.org/licenses/MIT // -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the +// Unless required by applicable law or agreed to in writing, software distributed +// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +// CONDITIONS OF ANY KIND, either express or implied. See the License for the // specific language governing permissions and limitations under the License. #include "unittest.h" diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/jsoncheckertest.cpp b/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/jsoncheckertest.cpp index 19e1f1c47a..aadce0a060 100644 --- a/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/jsoncheckertest.cpp +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/jsoncheckertest.cpp @@ -1,5 +1,5 @@ // 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. // // Licensed under the MIT License (the "License"); you may not use this file except @@ -7,9 +7,9 @@ // // http://opensource.org/licenses/MIT // -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the +// Unless required by applicable law or agreed to in writing, software distributed +// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +// CONDITIONS OF ANY KIND, either express or implied. See the License for the // specific language governing permissions and limitations under the License. #include "unittest.h" @@ -104,7 +104,7 @@ TEST(JsonChecker, Reader) { break; } EXPECT_TRUE(reader.HasParseError()) << filename; - + free(json); } @@ -126,7 +126,7 @@ TEST(JsonChecker, Reader) { // Test iterative parsing. document.Parse<kParseIterativeFlag>(json); EXPECT_FALSE(document.HasParseError()) << filename; - + // Test iterative pull-parsing. Reader reader; StringStream ss(json); diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/namespacetest.cpp b/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/namespacetest.cpp index e33e6d5f54..2755d6f16f 100644 --- a/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/namespacetest.cpp +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/namespacetest.cpp @@ -1,5 +1,5 @@ // 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. // // Licensed under the MIT License (the "License"); you may not use this file except @@ -7,14 +7,14 @@ // // http://opensource.org/licenses/MIT // -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the +// Unless required by applicable law or agreed to in writing, software distributed +// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +// CONDITIONS OF ANY KIND, either express or implied. See the License for the // specific language governing permissions and limitations under the License. #include "unittest.h" -// test another instantiation of RapidJSON in a different namespace +// test another instantiation of RapidJSON in a different namespace #define RAPIDJSON_NAMESPACE my::rapid::json #define RAPIDJSON_NAMESPACE_BEGIN namespace my { namespace rapid { namespace json { diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/ostreamwrappertest.cpp b/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/ostreamwrappertest.cpp index c9bc5f4bfb..ec809e2edc 100644 --- a/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/ostreamwrappertest.cpp +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/ostreamwrappertest.cpp @@ -1,5 +1,5 @@ // 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. // // Licensed under the MIT License (the "License"); you may not use this file except @@ -7,9 +7,9 @@ // // http://opensource.org/licenses/MIT // -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the +// Unless required by applicable law or agreed to in writing, software distributed +// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +// CONDITIONS OF ANY KIND, either express or implied. See the License for the // specific language governing permissions and limitations under the License. #include "unittest.h" @@ -77,7 +77,7 @@ static void TestFileStream() { } fp = fopen(filename, "r"); - ASSERT_TRUE( fp != NULL ); + ASSERT_TRUE( fp != NULL ); for (const char* p = s; *p; p++) EXPECT_EQ(*p, static_cast<char>(fgetc(fp))); fclose(fp); diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/platformtest.cpp b/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/platformtest.cpp index 05eba3f5bd..e03fe8f099 100644 --- a/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/platformtest.cpp +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/platformtest.cpp @@ -1,5 +1,5 @@ // Tencent is pleased to support the open source community by making RapidJSON available. -// +// // Copyright (C) 2021 THL A29 Limited, a Tencent company, and Milo Yip. // // Licensed under the MIT License (the "License"); you may not use this file except @@ -7,15 +7,15 @@ // // http://opensource.org/licenses/MIT // -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the +// Unless required by applicable law or agreed to in writing, software distributed +// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +// CONDITIONS OF ANY KIND, either express or implied. See the License for the // specific language governing permissions and limitations under the License. #include "unittest.h" // see https://github.com/Tencent/rapidjson/issues/1448 -// including windows.h on purpose to provoke a compile time problem as GetObject is a +// including windows.h on purpose to provoke a compile time problem as GetObject is a // macro that gets defined when windows.h is included #ifdef _WIN32 #include <windows.h> diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/pointertest.cpp b/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/pointertest.cpp index 342086dd10..4173f15e7e 100644 --- a/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/pointertest.cpp +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/pointertest.cpp @@ -1,5 +1,5 @@ // 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. // // Licensed under the MIT License (the "License"); you may not use this file except @@ -7,9 +7,9 @@ // // http://opensource.org/licenses/MIT // -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the +// Unless required by applicable law or agreed to in writing, software distributed +// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +// CONDITIONS OF ANY KIND, either express or implied. See the License for the // specific language governing permissions and limitations under the License. #include "unittest.h" @@ -475,7 +475,7 @@ TEST(Pointer, CopyConstructor) { EXPECT_EQ(1u, q.GetTokens()[1].length); EXPECT_STREQ("0", q.GetTokens()[1].name); EXPECT_EQ(0u, q.GetTokens()[1].index); - + // Copied pointer needs to have its own allocator EXPECT_NE(&p.GetAllocator(), &q.GetAllocator()); } @@ -837,7 +837,7 @@ TEST(Pointer, Set) { Document d; d.Parse(kJson); Document::AllocatorType& a = d.GetAllocator(); - + // Value version Pointer("/foo/0").Set(d, Value(123).Move(), a); EXPECT_EQ(123, d["foo"][0].GetInt()); @@ -896,7 +896,7 @@ TEST(Pointer, Set) { TEST(Pointer, Set_NoAllocator) { Document d; d.Parse(kJson); - + // Value version Pointer("/foo/0").Set(d, Value(123).Move()); EXPECT_EQ(123, d["foo"][0].GetInt()); @@ -1727,4 +1727,4 @@ TEST(Pointer, Issue1899) { EXPECT_TRUE(PointerType("/foo/1234") == q); q = q.Append(""); EXPECT_TRUE(PointerType("/foo/1234/") == q); -}
\ No newline at end of file +} diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/prettywritertest.cpp b/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/prettywritertest.cpp index 0b7feef3b2..3b3608097c 100644 --- a/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/prettywritertest.cpp +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/prettywritertest.cpp @@ -1,5 +1,5 @@ // 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. // // Licensed under the MIT License (the "License"); you may not use this file except @@ -7,9 +7,9 @@ // // http://opensource.org/licenses/MIT // -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the +// Unless required by applicable law or agreed to in writing, software distributed +// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +// CONDITIONS OF ANY KIND, either express or implied. See the License for the // specific language governing permissions and limitations under the License. #include "unittest.h" @@ -150,15 +150,15 @@ private: // For covering PutN() generic version TEST(PrettyWriter, OStreamWrapper) { StringStream s(kJson); - + std::stringstream ss; OStreamWrapper os(ss); - + PrettyWriter<OStreamWrapper> writer(os); Reader reader; reader.Parse(s, writer); - + std::string actual = ss.str(); EXPECT_STREQ(kPrettyJson, actual.c_str()); } @@ -217,7 +217,7 @@ TEST(PrettyWriter, InvalidEventSequence) { EXPECT_THROW(writer.EndArray(), AssertException); EXPECT_FALSE(writer.IsComplete()); } - + // [} { StringBuffer buffer; @@ -226,7 +226,7 @@ TEST(PrettyWriter, InvalidEventSequence) { EXPECT_THROW(writer.EndObject(), AssertException); EXPECT_FALSE(writer.IsComplete()); } - + // { 1: { StringBuffer buffer; @@ -235,7 +235,7 @@ TEST(PrettyWriter, InvalidEventSequence) { EXPECT_THROW(writer.Int(1), AssertException); EXPECT_FALSE(writer.IsComplete()); } - + // { 'a' } { StringBuffer buffer; @@ -245,7 +245,7 @@ TEST(PrettyWriter, InvalidEventSequence) { EXPECT_THROW(writer.EndObject(), AssertException); EXPECT_FALSE(writer.IsComplete()); } - + // { 'a':'b','c' } { StringBuffer buffer; @@ -304,13 +304,13 @@ TEST(PrettyWriter, Inf) { TEST(PrettyWriter, Issue_889) { char buf[100] = "Hello"; - + StringBuffer buffer; PrettyWriter<StringBuffer> writer(buffer); writer.StartArray(); writer.String(buf); writer.EndArray(); - + EXPECT_STREQ("[\n \"Hello\"\n]", buffer.GetString()); EXPECT_TRUE(writer.IsComplete()); \ } diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/regextest.cpp b/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/regextest.cpp index a288622bc7..2296ba2980 100644 --- a/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/regextest.cpp +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/regextest.cpp @@ -1,5 +1,5 @@ // 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. // // Licensed under the MIT License (the "License"); you may not use this file except @@ -7,9 +7,9 @@ // // http://opensource.org/licenses/MIT // -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the +// Unless required by applicable law or agreed to in writing, software distributed +// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +// CONDITIONS OF ANY KIND, either express or implied. See the License for the // specific language governing permissions and limitations under the License. #include "unittest.h" @@ -404,7 +404,7 @@ TEST(Regex, QuantifierMinMax5) { #define EURO "\xE2\x82\xAC" // "\xE2\x82\xAC" is UTF-8 rsquence of Euro sign U+20AC TEST(Regex, Unicode) { - Regex re("a" EURO "+b"); + Regex re("a" EURO "+b"); ASSERT_TRUE(re.IsValid()); RegexSearch rs(re); EXPECT_TRUE(rs.Match("a" EURO "b")); diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/schematest.cpp b/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/schematest.cpp index 1b25e2f44e..92c1b72384 100644 --- a/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/schematest.cpp +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/schematest.cpp @@ -1,5 +1,5 @@ // 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. // // Licensed under the MIT License (the "License"); you may not use this file except @@ -7,9 +7,9 @@ // // http://opensource.org/licenses/MIT // -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the +// Unless required by applicable law or agreed to in writing, software distributed +// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +// CONDITIONS OF ANY KIND, either express or implied. See the License for the // specific language governing permissions and limitations under the License. #define RAPIDJSON_SCHEMA_VERBOSE 0 @@ -192,7 +192,7 @@ TEST(SchemaValidator, Typeless) { Document sd; sd.Parse("{}"); SchemaDocument s(sd); - + VALIDATE(s, "42", true); VALIDATE(s, "\"I'm a string\"", true); VALIDATE(s, "{ \"an\": [ \"arbitrarily\", \"nested\" ], \"data\": \"structure\" }", true); @@ -1030,7 +1030,7 @@ TEST(SchemaValidator, Object) { SchemaDocument s(sd); VALIDATE(s, "{\"key\":\"value\",\"another_key\":\"another_value\"}", true); - VALIDATE(s, "{\"Sun\":1.9891e30,\"Jupiter\":1.8986e27,\"Saturn\":5.6846e26,\"Neptune\":10.243e25,\"Uranus\":8.6810e25,\"Earth\":5.9736e24,\"Venus\":4.8685e24,\"Mars\":6.4185e23,\"Mercury\":3.3022e23,\"Moon\":7.349e22,\"Pluto\":1.25e22}", true); + VALIDATE(s, "{\"Sun\":1.9891e30,\"Jupiter\":1.8986e27,\"Saturn\":5.6846e26,\"Neptune\":10.243e25,\"Uranus\":8.6810e25,\"Earth\":5.9736e24,\"Venus\":4.8685e24,\"Mars\":6.4185e23,\"Mercury\":3.3022e23,\"Moon\":7.349e22,\"Pluto\":1.25e22}", true); INVALIDATE(s, "[\"An\", \"array\", \"not\", \"an\", \"object\"]", "", "type", "", "{ \"type\": {" " \"errorCode\": 20," @@ -2089,9 +2089,9 @@ TEST(SchemaValidator, ValidateMetaSchema_UTF16) { template <typename SchemaDocumentType = SchemaDocument> class RemoteSchemaDocumentProvider : public IGenericRemoteSchemaDocumentProvider<SchemaDocumentType> { public: - RemoteSchemaDocumentProvider() : - documentAllocator_(documentBuffer_, sizeof(documentBuffer_)), - schemaAllocator_(schemaBuffer_, sizeof(schemaBuffer_)) + RemoteSchemaDocumentProvider() : + documentAllocator_(documentBuffer_, sizeof(documentBuffer_)), + schemaAllocator_(schemaBuffer_, sizeof(schemaBuffer_)) { const char* filenames[kCount] = { "jsonschema/remotes/integer.json", @@ -2402,11 +2402,11 @@ TEST(SchemaValidator, Issue1017_allOfHandler) { GenericSchemaValidator<SchemaDocument, Writer<StringBuffer> > validator(s, writer); EXPECT_TRUE(validator.StartObject()); EXPECT_TRUE(validator.Key("cyanArray2", 10, false)); - EXPECT_TRUE(validator.StartArray()); - EXPECT_TRUE(validator.EndArray(0)); + EXPECT_TRUE(validator.StartArray()); + EXPECT_TRUE(validator.EndArray(0)); EXPECT_TRUE(validator.Key("blackArray", 10, false)); - EXPECT_TRUE(validator.StartArray()); - EXPECT_TRUE(validator.EndArray(0)); + EXPECT_TRUE(validator.StartArray()); + EXPECT_TRUE(validator.EndArray(0)); EXPECT_TRUE(validator.EndObject(0)); EXPECT_TRUE(validator.IsValid()); EXPECT_STREQ("{\"cyanArray2\":[],\"blackArray\":[]}", sb.GetString()); diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/simdtest.cpp b/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/simdtest.cpp index 649505fab2..924fd5c1b3 100644 --- a/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/simdtest.cpp +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/simdtest.cpp @@ -1,5 +1,5 @@ // 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. // // Licensed under the MIT License (the "License"); you may not use this file except @@ -7,9 +7,9 @@ // // http://opensource.org/licenses/MIT // -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the +// Unless required by applicable law or agreed to in writing, software distributed +// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +// CONDITIONS OF ANY KIND, either express or implied. See the License for the // specific language governing permissions and limitations under the License. // Since Travis CI installs old Valgrind 3.7.0, which fails with some SSE4.2 diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/strfunctest.cpp b/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/strfunctest.cpp index 411269396a..a8d0aad158 100644 --- a/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/strfunctest.cpp +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/strfunctest.cpp @@ -1,5 +1,5 @@ // 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. // // Licensed under the MIT License (the "License"); you may not use this file except @@ -7,9 +7,9 @@ // // http://opensource.org/licenses/MIT // -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the +// Unless required by applicable law or agreed to in writing, software distributed +// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +// CONDITIONS OF ANY KIND, either express or implied. See the License for the // specific language governing permissions and limitations under the License. #include "unittest.h" diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/stringbuffertest.cpp b/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/stringbuffertest.cpp index eaa29e715e..a7ec2b6af6 100644 --- a/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/stringbuffertest.cpp +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/stringbuffertest.cpp @@ -1,5 +1,5 @@ // 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. // // Licensed under the MIT License (the "License"); you may not use this file except @@ -7,9 +7,9 @@ // // http://opensource.org/licenses/MIT // -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the +// Unless required by applicable law or agreed to in writing, software distributed +// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +// CONDITIONS OF ANY KIND, either express or implied. See the License for the // specific language governing permissions and limitations under the License. #include "unittest.h" diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/strtodtest.cpp b/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/strtodtest.cpp index 66167a4a35..2fcb63524f 100644 --- a/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/strtodtest.cpp +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/strtodtest.cpp @@ -1,5 +1,5 @@ // 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. // // Licensed under the MIT License (the "License"); you may not use this file except @@ -7,9 +7,9 @@ // // http://opensource.org/licenses/MIT // -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the +// Unless required by applicable law or agreed to in writing, software distributed +// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +// CONDITIONS OF ANY KIND, either express or implied. See the License for the // specific language governing permissions and limitations under the License. #include "unittest.h" @@ -117,7 +117,7 @@ TEST(Strtod, CheckApproximationCase) { EXPECT_TRUE(BIGINTEGER_LITERAL("17763568394002504646778106689453125") == hS); EXPECT_EQ(1, dS.Compare(bS)); - + BigInteger delta(0); EXPECT_FALSE(dS.Difference(bS, &delta)); EXPECT_TRUE(BIGINTEGER_LITERAL("16216586195252933526457586554279088") == delta); diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/unittest.cpp b/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/unittest.cpp index 879976a782..c5b6f2710a 100644 --- a/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/unittest.cpp +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/unittest.cpp @@ -1,5 +1,5 @@ // 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. // // Licensed under the MIT License (the "License"); you may not use this file except @@ -7,9 +7,9 @@ // // http://opensource.org/licenses/MIT // -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the +// Unless required by applicable law or agreed to in writing, software distributed +// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +// CONDITIONS OF ANY KIND, either express or implied. See the License for the // specific language governing permissions and limitations under the License. #include "unittest.h" diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/unittest.h b/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/unittest.h index 0e64d3970b..567389a17a 100644 --- a/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/unittest.h +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/unittest.h @@ -1,5 +1,5 @@ // 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. // // Licensed under the MIT License (the "License"); you may not use this file except @@ -7,9 +7,9 @@ // // http://opensource.org/licenses/MIT // -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the +// Unless required by applicable law or agreed to in writing, software distributed +// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +// CONDITIONS OF ANY KIND, either express or implied. See the License for the // specific language governing permissions and limitations under the License. #ifndef UNITTEST_H_ @@ -85,7 +85,7 @@ inline FILE* TempFile(char *filename) { if (filename[0] == '\\') for (int i = 0; filename[i] != '\0'; i++) filename[i] = filename[i + 1]; - + return fopen(filename, "wb"); #else strcpy(filename, "/tmp/fileXXXXXX"); diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/valuetest.cpp b/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/valuetest.cpp index 0a6b325f4b..6ef22b7260 100644 --- a/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/valuetest.cpp +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/valuetest.cpp @@ -1,5 +1,5 @@ // 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. // // Licensed under the MIT License (the "License"); you may not use this file except @@ -7,9 +7,9 @@ // // http://opensource.org/licenses/MIT // -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the +// Unless required by applicable law or agreed to in writing, software distributed +// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +// CONDITIONS OF ANY KIND, either express or implied. See the License for the // specific language governing permissions and limitations under the License. #include "unittest.h" @@ -161,7 +161,7 @@ TEST(Value, AssignmentOperator) { #endif // RAPIDJSON_HAS_CXX11_RVALUE_REFS } -template <typename A, typename B> +template <typename A, typename B> void TestEqual(const A& a, const B& b) { EXPECT_TRUE (a == b); EXPECT_FALSE(a != b); @@ -169,7 +169,7 @@ void TestEqual(const A& a, const B& b) { EXPECT_FALSE(b != a); } -template <typename A, typename B> +template <typename A, typename B> void TestUnequal(const A& a, const B& b) { EXPECT_FALSE(a == b); EXPECT_TRUE (a != b); @@ -1060,7 +1060,7 @@ static void TestArray(T& x, Allocator& allocator) { x.Clear(); for (unsigned i = 0; i < n; i++) x.PushBack(Value(kArrayType).PushBack(i, allocator).Move(), allocator); - + itr = x.Erase(x.Begin() + first, x.Begin() + last); if (last == n) EXPECT_EQ(x.End(), itr); @@ -1345,7 +1345,7 @@ static void TestObject(T& x, Allocator& allocator) { #endif // member iterator - Value::MemberIterator itr = x.MemberBegin(); + Value::MemberIterator itr = x.MemberBegin(); EXPECT_TRUE(itr != x.MemberEnd()); EXPECT_STREQ("A", itr->name.GetString()); EXPECT_STREQ("Apple", itr->value.GetString()); @@ -1361,7 +1361,7 @@ static void TestObject(T& x, Allocator& allocator) { EXPECT_FALSE(itr != x.MemberEnd()); // const member iterator - Value::ConstMemberIterator citr = y.MemberBegin(); + Value::ConstMemberIterator citr = y.MemberBegin(); EXPECT_TRUE(citr != y.MemberEnd()); EXPECT_STREQ("A", citr->name.GetString()); EXPECT_STREQ("Apple", citr->value.GetString()); @@ -1556,7 +1556,7 @@ TEST(Value, ObjectHelper) { EXPECT_STREQ("apple", y["a"].GetString()); EXPECT_TRUE(x.IsObject()); // Invariant } - + { Value x(kObjectType); x.AddMember("a", "apple", allocator); @@ -1674,7 +1674,7 @@ TEST(Value, BigNestedObject) { for (SizeType i = 0; i < n; i++) { char name1[10]; sprintf(name1, "%d", i); - + for (SizeType j = 0; j < n; j++) { char name2[10]; sprintf(name2, "%d", j); @@ -1689,8 +1689,8 @@ TEST(Value, BigNestedObject) { TEST(Value, RemoveLastElement) { rapidjson::Document doc; rapidjson::Document::AllocatorType& allocator = doc.GetAllocator(); - rapidjson::Value objVal(rapidjson::kObjectType); - objVal.AddMember("var1", 123, allocator); + rapidjson::Value objVal(rapidjson::kObjectType); + objVal.AddMember("var1", 123, allocator); objVal.AddMember("var2", "444", allocator); objVal.AddMember("var3", 555, allocator); EXPECT_TRUE(objVal.HasMember("var3")); @@ -1712,22 +1712,22 @@ TEST(Document, CrtAllocator) { static void TestShortStringOptimization(const char* str) { const rapidjson::SizeType len = static_cast<rapidjson::SizeType>(strlen(str)); - + rapidjson::Document doc; rapidjson::Value val; val.SetString(str, len, doc.GetAllocator()); - - EXPECT_EQ(val.GetStringLength(), len); - EXPECT_STREQ(val.GetString(), str); + + EXPECT_EQ(val.GetStringLength(), len); + EXPECT_STREQ(val.GetString(), str); } TEST(Value, AllocateShortString) { - TestShortStringOptimization(""); // edge case: empty string - TestShortStringOptimization("12345678"); // regular case for short strings: 8 chars - TestShortStringOptimization("12345678901"); // edge case: 11 chars in 32-bit mode (=> short string) - TestShortStringOptimization("123456789012"); // edge case: 12 chars in 32-bit mode (=> regular string) - TestShortStringOptimization("123456789012345"); // edge case: 15 chars in 64-bit mode (=> short string) - TestShortStringOptimization("1234567890123456"); // edge case: 16 chars in 64-bit mode (=> regular string) + TestShortStringOptimization(""); // edge case: empty string + TestShortStringOptimization("12345678"); // regular case for short strings: 8 chars + TestShortStringOptimization("12345678901"); // edge case: 11 chars in 32-bit mode (=> short string) + TestShortStringOptimization("123456789012"); // edge case: 12 chars in 32-bit mode (=> regular string) + TestShortStringOptimization("123456789012345"); // edge case: 15 chars in 64-bit mode (=> short string) + TestShortStringOptimization("1234567890123456"); // edge case: 16 chars in 64-bit mode (=> regular string) } template <int e> @@ -1802,7 +1802,7 @@ static void MergeDuplicateKey(Value& v, Value::AllocatorType& a) { // Convert all key:value into key:[value] for (Value::MemberIterator itr = v.MemberBegin(); itr != v.MemberEnd(); ++itr) itr->value = Value(kArrayType).Move().PushBack(itr->value, a); - + // Merge arrays if key is duplicated for (Value::MemberIterator itr = v.MemberBegin(); itr != v.MemberEnd();) { Value::MemberIterator itr2 = v.FindMember(itr->name); diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/writertest.cpp b/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/writertest.cpp index ac9ad899e1..bfbd71c4c9 100644 --- a/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/writertest.cpp +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/writertest.cpp @@ -1,5 +1,5 @@ // 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. // // Licensed under the MIT License (the "License"); you may not use this file except @@ -7,9 +7,9 @@ // // http://opensource.org/licenses/MIT // -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the +// Unless required by applicable law or agreed to in writing, software distributed +// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +// CONDITIONS OF ANY KIND, either express or implied. See the License for the // specific language governing permissions and limitations under the License. #include "unittest.h" @@ -102,13 +102,13 @@ TEST(Writer, String) { TEST(Writer, Issue_889) { char buf[100] = "Hello"; - + StringBuffer buffer; Writer<StringBuffer> writer(buffer); writer.StartArray(); writer.String(buf); writer.EndArray(); - + EXPECT_STREQ("[\"Hello\"]", buffer.GetString()); EXPECT_TRUE(writer.IsComplete()); \ } @@ -220,15 +220,15 @@ private: TEST(Writer, OStreamWrapper) { StringStream s("{ \"hello\" : \"world\", \"t\" : true , \"f\" : false, \"n\": null, \"i\":123, \"pi\": 3.1416, \"a\":[1, 2, 3], \"u64\": 1234567890123456789, \"i64\":-1234567890123456789 } "); - + std::stringstream ss; OStreamWrapper os(ss); - + Writer<OStreamWrapper> writer(os); Reader reader; reader.Parse<0>(s, writer); - + std::string actual = ss.str(); EXPECT_STREQ("{\"hello\":\"world\",\"t\":true,\"f\":false,\"n\":null,\"i\":123,\"pi\":3.1416,\"a\":[1,2,3],\"u64\":1234567890123456789,\"i64\":-1234567890123456789}", actual.c_str()); } @@ -449,7 +449,7 @@ TEST(Writer, InvalidEventSequence) { EXPECT_FALSE(writer.IsComplete()); } - // { 1: + // { 1: { StringBuffer buffer; Writer<StringBuffer> writer(buffer); |