Skip to content

Commit ff58fdc

Browse files
authored
Update coverage badge (open-source-parsers#1088)
update coverage badge change int to Json::ArrayIndex in for-loop
1 parent 82b7367 commit ff58fdc

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
[![badge](https://img.shields.io/badge/conan.io-jsoncpp%2F1.8.0-green.svg?logo=data:image/png;base64%2CiVBORw0KGgoAAAANSUhEUgAAAA4AAAAOCAMAAAAolt3jAAAA1VBMVEUAAABhlctjlstkl8tlmMtlmMxlmcxmmcxnmsxpnMxpnM1qnc1sn85voM91oM11oc1xotB2oc56pNF6pNJ2ptJ8ptJ8ptN9ptN8p9N5qNJ9p9N9p9R8qtOBqdSAqtOAqtR%2BrNSCrNJ/rdWDrNWCsNWCsNaJs9eLs9iRvNuVvdyVv9yXwd2Zwt6axN6dxt%2Bfx%2BChyeGiyuGjyuCjyuGly%2BGlzOKmzOGozuKoz%2BKqz%2BOq0OOv1OWw1OWw1eWx1eWy1uay1%2Baz1%2Baz1%2Bez2Oe02Oe12ee22ujUGwH3AAAAAXRSTlMAQObYZgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAACxMAAAsTAQCanBgAAAAHdElNRQfgBQkREyOxFIh/AAAAiklEQVQI12NgAAMbOwY4sLZ2NtQ1coVKWNvoc/Eq8XDr2wB5Ig62ekza9vaOqpK2TpoMzOxaFtwqZua2Bm4makIM7OzMAjoaCqYuxooSUqJALjs7o4yVpbowvzSUy87KqSwmxQfnsrPISyFzWeWAXCkpMaBVIC4bmCsOdgiUKwh3JojLgAQ4ZCE0AMm2D29tZwe6AAAAAElFTkSuQmCC)](https://bintray.com/theirix/conan-repo/jsoncpp%3Atheirix)
44
[![badge](https://img.shields.io/badge/license-MIT-blue)](https://github.com/open-source-parsers/jsoncpp/blob/master/LICENSE)
55
[![badge](https://img.shields.io/badge/document-doxygen-brightgreen)](http://open-source-parsers.github.io/jsoncpp-docs/doxygen/index.html)
6-
[![Coverage Status](https://coveralls.io/repos/github/open-source-parsers/jsoncpp/badge.svg)](https://coveralls.io/github/open-source-parsers/jsoncpp)
6+
[![Coverage Status](https://coveralls.io/repos/github/open-source-parsers/jsoncpp/badge.svg?branch=master)](https://coveralls.io/github/open-source-parsers/jsoncpp?branch=master)
77

88

99
[JSON][json-org] is a lightweight data-interchange format. It can represent

src/test_lib_json/main.cpp

+10-10
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,7 @@ JSONTEST_FIXTURE_LOCAL(ValueTest, arrays) {
332332
JSONTEST_FIXTURE_LOCAL(ValueTest, resizeArray) {
333333
Json::Value array;
334334
{
335-
for (int i = 0; i < 10; i++)
335+
for (Json::ArrayIndex i = 0; i < 10; i++)
336336
array[i] = i;
337337
JSONTEST_ASSERT_EQUAL(array.size(), 10);
338338
// The length set is greater than the length of the array.
@@ -348,7 +348,7 @@ JSONTEST_FIXTURE_LOCAL(ValueTest, resizeArray) {
348348
JSONTEST_ASSERT_EQUAL(array.size(), 0);
349349
}
350350
{
351-
for (int i = 0; i < 10; i++)
351+
for (Json::ArrayIndex i = 0; i < 10; i++)
352352
array[i] = i;
353353
JSONTEST_ASSERT_EQUAL(array.size(), 10);
354354
array.clear();
@@ -357,7 +357,7 @@ JSONTEST_FIXTURE_LOCAL(ValueTest, resizeArray) {
357357
}
358358
JSONTEST_FIXTURE_LOCAL(ValueTest, getArrayValue) {
359359
Json::Value array;
360-
for (int i = 0; i < 5; i++)
360+
for (Json::ArrayIndex i = 0; i < 5; i++)
361361
array[i] = i;
362362

363363
JSONTEST_ASSERT_EQUAL(array.size(), 5);
@@ -395,7 +395,7 @@ JSONTEST_FIXTURE_LOCAL(ValueTest, arrayInsertAtRandomIndex) {
395395
array.append(str0); // append lvalue
396396

397397
std::vector<Json::Value*> vec; // storage value address for checking
398-
for (int i = 0; i < 3; i++) {
398+
for (Json::ArrayIndex i = 0; i < 3; i++) {
399399
vec.push_back(&array[i]);
400400
}
401401
JSONTEST_ASSERT_EQUAL(Json::Value("index0"), array[0]); // check append
@@ -2265,7 +2265,7 @@ JSONTEST_FIXTURE_LOCAL(StyledWriterTest, multiLineArray) {
22652265
"15,\n 16,\n 17,\n "
22662266
"18,\n 19,\n 20\n]\n");
22672267
Json::Value root;
2268-
for (int i = 0; i < 21; i++)
2268+
for (Json::ArrayIndex i = 0; i < 21; i++)
22692269
root[i] = i;
22702270
const Json::String result = writer.write(root);
22712271
JSONTEST_ASSERT_STRING_EQUAL(expected, result);
@@ -2274,7 +2274,7 @@ JSONTEST_FIXTURE_LOCAL(StyledWriterTest, multiLineArray) {
22742274
// Array members do not exceed 21 print effects to render a single line
22752275
const Json::String expected("[ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 ]\n");
22762276
Json::Value root;
2277-
for (int i = 0; i < 10; i++)
2277+
for (Json::ArrayIndex i = 0; i < 10; i++)
22782278
root[i] = i;
22792279
const Json::String result = writer.write(root);
22802280
JSONTEST_ASSERT_STRING_EQUAL(expected, result);
@@ -2400,7 +2400,7 @@ JSONTEST_FIXTURE_LOCAL(StyledStreamWriterTest, multiLineArray) {
24002400
"\n\t20\n]\n");
24012401
Json::StyledStreamWriter writer;
24022402
Json::Value root;
2403-
for (int i = 0; i < 21; i++)
2403+
for (Json::ArrayIndex i = 0; i < 21; i++)
24042404
root[i] = i;
24052405
Json::OStringStream sout;
24062406
writer.write(sout, root);
@@ -2412,7 +2412,7 @@ JSONTEST_FIXTURE_LOCAL(StyledStreamWriterTest, multiLineArray) {
24122412
// Array members do not exceed 21 print effects to render a single line
24132413
const Json::String expected("[ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 ]\n");
24142414
Json::Value root;
2415-
for (int i = 0; i < 10; i++)
2415+
for (Json::ArrayIndex i = 0; i < 10; i++)
24162416
root[i] = i;
24172417
Json::OStringStream sout;
24182418
writer.write(sout, root);
@@ -2547,7 +2547,7 @@ JSONTEST_FIXTURE_LOCAL(StreamWriterTest, multiLineArray) {
25472547
"\n\t19,"
25482548
"\n\t20\n]");
25492549
Json::Value root;
2550-
for (int i = 0; i < 21; i++)
2550+
for (Json::ArrayIndex i = 0; i < 21; i++)
25512551
root[i] = i;
25522552
const Json::String result = Json::writeString(wb, root);
25532553
JSONTEST_ASSERT_STRING_EQUAL(expected, result);
@@ -2556,7 +2556,7 @@ JSONTEST_FIXTURE_LOCAL(StreamWriterTest, multiLineArray) {
25562556
// Array members do not exceed 21 print effects to render a single line
25572557
const Json::String expected("[ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 ]");
25582558
Json::Value root;
2559-
for (int i = 0; i < 10; i++)
2559+
for (Json::ArrayIndex i = 0; i < 10; i++)
25602560
root[i] = i;
25612561
const Json::String result = Json::writeString(wb, root);
25622562
JSONTEST_ASSERT_STRING_EQUAL(expected, result);

0 commit comments

Comments
 (0)