fix whitespace and add .editorconfig
This commit is contained in:
parent
795f516cea
commit
f9889a9ff2
9
.editorconfig
Normal file
9
.editorconfig
Normal file
@ -0,0 +1,9 @@
|
||||
root = true
|
||||
|
||||
[*]
|
||||
indent_style = space
|
||||
indent_size = 4
|
||||
end_of_line = lf
|
||||
charset = utf-8
|
||||
trim_trailing_whitespace = true
|
||||
insert_final_newline = true
|
||||
@ -165,7 +165,7 @@ TEST_CASE("array")
|
||||
json nonarray = 1;
|
||||
CHECK_THROWS_AS(nonarray.at(0), std::domain_error);
|
||||
CHECK_THROWS_AS(const int i = nonarray[0], std::domain_error);
|
||||
SKIP_FOR_VS(CHECK_NOTHROW(j[21]));
|
||||
SKIP_FOR_VS(CHECK_NOTHROW(j[21]));
|
||||
CHECK_THROWS_AS(const int i = j.at(21), std::out_of_range);
|
||||
CHECK_THROWS_AS(nonarray[0] = 10, std::domain_error);
|
||||
// the next test is remove due to undefined behavior
|
||||
@ -177,7 +177,7 @@ TEST_CASE("array")
|
||||
const json j_const = j;
|
||||
CHECK_THROWS_AS(nonarray_const.at(0), std::domain_error);
|
||||
CHECK_THROWS_AS(const int i = nonarray_const[0], std::domain_error);
|
||||
SKIP_FOR_VS(CHECK_NOTHROW(j_const[21]));
|
||||
SKIP_FOR_VS(CHECK_NOTHROW(j_const[21]));
|
||||
CHECK_THROWS_AS(const int i = j.at(21), std::out_of_range);
|
||||
|
||||
{
|
||||
@ -190,7 +190,7 @@ TEST_CASE("array")
|
||||
}
|
||||
|
||||
const json k = j;
|
||||
SKIP_FOR_VS(CHECK_NOTHROW(k[21]));
|
||||
SKIP_FOR_VS(CHECK_NOTHROW(k[21]));
|
||||
CHECK_THROWS_AS(const int i = k.at(21), std::out_of_range);
|
||||
|
||||
// add initializer list
|
||||
|
||||
Loading…
Reference in New Issue
Block a user