Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
json
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
json
Commits
39b8d6bd
Commit
39b8d6bd
authored
Dec 20, 2020
by
Alexander Karzhenkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Restore intentionally disrupted C++17 tests
parent
aae0e495
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
0 additions
and
6 deletions
+0
-6
test/src/unit-conversions.cpp
test/src/unit-conversions.cpp
+0
-4
test/src/unit-items.cpp
test/src/unit-items.cpp
+0
-1
test/src/unit-regression2.cpp
test/src/unit-regression2.cpp
+0
-1
No files found.
test/src/unit-conversions.cpp
View file @
39b8d6bd
...
@@ -465,7 +465,6 @@ TEST_CASE("value conversion")
...
@@ -465,7 +465,6 @@ TEST_CASE("value conversion")
#if defined(JSON_HAS_CPP_17)
#if defined(JSON_HAS_CPP_17)
SECTION
(
"std::string_view"
)
SECTION
(
"std::string_view"
)
{
{
static_assert
(
false
);
std
::
string_view
s
=
j
.
get
<
std
::
string_view
>
();
std
::
string_view
s
=
j
.
get
<
std
::
string_view
>
();
CHECK
(
json
(
s
)
==
j
);
CHECK
(
json
(
s
)
==
j
);
}
}
...
@@ -515,7 +514,6 @@ TEST_CASE("value conversion")
...
@@ -515,7 +514,6 @@ TEST_CASE("value conversion")
#if defined(JSON_HAS_CPP_17)
#if defined(JSON_HAS_CPP_17)
SECTION
(
"exception in case of a non-string type using string_view"
)
SECTION
(
"exception in case of a non-string type using string_view"
)
{
{
static_assert
(
false
);
CHECK_THROWS_AS
(
json
(
json
::
value_t
::
null
).
get
<
std
::
string_view
>
(),
json
::
type_error
&
);
CHECK_THROWS_AS
(
json
(
json
::
value_t
::
null
).
get
<
std
::
string_view
>
(),
json
::
type_error
&
);
CHECK_THROWS_AS
(
json
(
json
::
value_t
::
object
).
get
<
std
::
string_view
>
(),
json
::
type_error
&
);
CHECK_THROWS_AS
(
json
(
json
::
value_t
::
object
).
get
<
std
::
string_view
>
(),
json
::
type_error
&
);
CHECK_THROWS_AS
(
json
(
json
::
value_t
::
array
).
get
<
std
::
string_view
>
(),
json
::
type_error
&
);
CHECK_THROWS_AS
(
json
(
json
::
value_t
::
array
).
get
<
std
::
string_view
>
(),
json
::
type_error
&
);
...
@@ -563,7 +561,6 @@ TEST_CASE("value conversion")
...
@@ -563,7 +561,6 @@ TEST_CASE("value conversion")
#if defined(JSON_HAS_CPP_17)
#if defined(JSON_HAS_CPP_17)
SECTION
(
"std::string_view"
)
SECTION
(
"std::string_view"
)
{
{
static_assert
(
false
);
std
::
string
s
=
"previous value"
;
std
::
string
s
=
"previous value"
;
std
::
string_view
sv
=
s
;
std
::
string_view
sv
=
s
;
j
.
get_to
(
sv
);
j
.
get_to
(
sv
);
...
@@ -620,7 +617,6 @@ TEST_CASE("value conversion")
...
@@ -620,7 +617,6 @@ TEST_CASE("value conversion")
#if defined(JSON_HAS_CPP_17)
#if defined(JSON_HAS_CPP_17)
SECTION
(
"std::string_view"
)
SECTION
(
"std::string_view"
)
{
{
static_assert
(
false
);
std
::
string_view
s
=
j
.
get
<
std
::
string_view
>
();
std
::
string_view
s
=
j
.
get
<
std
::
string_view
>
();
CHECK
(
json
(
s
)
==
j
);
CHECK
(
json
(
s
)
==
j
);
}
}
...
...
test/src/unit-items.cpp
View file @
39b8d6bd
...
@@ -886,7 +886,6 @@ TEST_CASE("items()")
...
@@ -886,7 +886,6 @@ TEST_CASE("items()")
#ifdef JSON_HAS_CPP_17
#ifdef JSON_HAS_CPP_17
SECTION
(
"structured bindings"
)
SECTION
(
"structured bindings"
)
{
{
static_assert
(
false
);
json
j
=
{
{
"A"
,
1
},
{
"B"
,
2
}
};
json
j
=
{
{
"A"
,
1
},
{
"B"
,
2
}
};
std
::
map
<
std
::
string
,
int
>
m
;
std
::
map
<
std
::
string
,
int
>
m
;
...
...
test/src/unit-regression2.cpp
View file @
39b8d6bd
...
@@ -250,7 +250,6 @@ TEST_CASE("regression tests 2")
...
@@ -250,7 +250,6 @@ TEST_CASE("regression tests 2")
#ifdef JSON_HAS_CPP_17
#ifdef JSON_HAS_CPP_17
SECTION
(
"issue #1292 - Serializing std::variant causes stack overflow"
)
SECTION
(
"issue #1292 - Serializing std::variant causes stack overflow"
)
{
{
static_assert
(
false
);
static_assert
(
static_assert
(
!
std
::
is_constructible
<
json
,
std
::
variant
<
int
,
float
>>::
value
,
""
);
!
std
::
is_constructible
<
json
,
std
::
variant
<
int
,
float
>>::
value
,
""
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment