Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
R
rapidjson
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
rapidjson
Commits
c8bed6b8
Commit
c8bed6b8
authored
Nov 23, 2014
by
Milo Yip
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix compilation errors in unit tests for VC
parent
52bf43df
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
66 additions
and
40 deletions
+66
-40
documenttest.cpp
test/unittest/documenttest.cpp
+31
-19
valuetest.cpp
test/unittest/valuetest.cpp
+35
-21
No files found.
test/unittest/documenttest.cpp
View file @
c8bed6b8
...
...
@@ -232,26 +232,38 @@ TEST(Document, UTF16_Document) {
#include <type_traits>
TEST
(
Document
,
Traits
)
{
static_assert
(
std
::
is_constructible
<
Document
>::
value
,
""
);
static_assert
(
std
::
is_default_constructible
<
Document
>::
value
,
""
);
static_assert
(
!
std
::
is_copy_constructible
<
Document
>::
value
,
""
);
static_assert
(
std
::
is_move_constructible
<
Document
>::
value
,
""
);
static_assert
(
!
std
::
is_nothrow_constructible
<
Document
>::
value
,
""
);
static_assert
(
!
std
::
is_nothrow_default_constructible
<
Document
>::
value
,
""
);
static_assert
(
!
std
::
is_nothrow_copy_constructible
<
Document
>::
value
,
""
);
static_assert
(
std
::
is_nothrow_move_constructible
<
Document
>::
value
,
""
);
static_assert
(
std
::
is_assignable
<
Document
,
Document
>::
value
,
""
);
static_assert
(
std
::
is_constructible
<
Document
>::
value
,
""
);
static_assert
(
std
::
is_default_constructible
<
Document
>::
value
,
""
);
#ifndef _MSC_VER
static_assert
(
!
std
::
is_copy_constructible
<
Document
>::
value
,
""
);
#endif
static_assert
(
std
::
is_move_constructible
<
Document
>::
value
,
""
);
static_assert
(
!
std
::
is_nothrow_constructible
<
Document
>::
value
,
""
);
static_assert
(
!
std
::
is_nothrow_default_constructible
<
Document
>::
value
,
""
);
static_assert
(
!
std
::
is_nothrow_copy_constructible
<
Document
>::
value
,
""
);
#ifndef _MSC_VER
static_assert
(
std
::
is_nothrow_move_constructible
<
Document
>::
value
,
""
);
#endif
static_assert
(
std
::
is_assignable
<
Document
,
Document
>::
value
,
""
);
#ifndef _MSC_VER
static_assert
(
!
std
::
is_copy_assignable
<
Document
>::
value
,
""
);
static_assert
(
std
::
is_move_assignable
<
Document
>::
value
,
""
);
static_assert
(
std
::
is_nothrow_assignable
<
Document
,
Document
>::
value
,
""
);
static_assert
(
!
std
::
is_nothrow_copy_assignable
<
Document
>::
value
,
""
);
static_assert
(
std
::
is_nothrow_move_assignable
<
Document
>::
value
,
""
);
static_assert
(
std
::
is_destructible
<
Document
>::
value
,
""
);
static_assert
(
std
::
is_nothrow_destructible
<
Document
>::
value
,
""
);
#endif
static_assert
(
std
::
is_move_assignable
<
Document
>::
value
,
""
);
#ifndef _MSC_VER
static_assert
(
std
::
is_nothrow_assignable
<
Document
,
Document
>::
value
,
""
);
#endif
static_assert
(
!
std
::
is_nothrow_copy_assignable
<
Document
>::
value
,
""
);
#ifndef _MSC_VER
static_assert
(
std
::
is_nothrow_move_assignable
<
Document
>::
value
,
""
);
#endif
static_assert
(
std
::
is_destructible
<
Document
>::
value
,
""
);
#ifndef _MSC_VER
static_assert
(
std
::
is_nothrow_destructible
<
Document
>::
value
,
""
);
#endif
}
template
<
typename
Allocator
>
...
...
test/unittest/valuetest.cpp
View file @
c8bed6b8
...
...
@@ -43,27 +43,41 @@ TEST(Value, DefaultConstructor) {
#include <type_traits>
TEST
(
Value
,
Traits
)
{
typedef
GenericValue
<
UTF8
<>
,
CrtAllocator
>
Value
;
static_assert
(
std
::
is_constructible
<
Value
>::
value
,
""
);
static_assert
(
std
::
is_default_constructible
<
Value
>::
value
,
""
);
static_assert
(
!
std
::
is_copy_constructible
<
Value
>::
value
,
""
);
static_assert
(
std
::
is_move_constructible
<
Value
>::
value
,
""
);
static_assert
(
std
::
is_nothrow_constructible
<
Value
>::
value
,
""
);
static_assert
(
std
::
is_nothrow_default_constructible
<
Value
>::
value
,
""
);
static_assert
(
!
std
::
is_nothrow_copy_constructible
<
Value
>::
value
,
""
);
static_assert
(
std
::
is_nothrow_move_constructible
<
Value
>::
value
,
""
);
static_assert
(
std
::
is_assignable
<
Value
,
Value
>::
value
,
""
);
static_assert
(
!
std
::
is_copy_assignable
<
Value
>::
value
,
""
);
static_assert
(
std
::
is_move_assignable
<
Value
>::
value
,
""
);
static_assert
(
std
::
is_nothrow_assignable
<
Value
,
Value
>::
value
,
""
);
static_assert
(
!
std
::
is_nothrow_copy_assignable
<
Value
>::
value
,
""
);
static_assert
(
std
::
is_nothrow_move_assignable
<
Value
>::
value
,
""
);
static_assert
(
std
::
is_destructible
<
Value
>::
value
,
""
);
static_assert
(
std
::
is_nothrow_destructible
<
Value
>::
value
,
""
);
typedef
GenericValue
<
UTF8
<>
,
CrtAllocator
>
Value
;
static_assert
(
std
::
is_constructible
<
Value
>::
value
,
""
);
static_assert
(
std
::
is_default_constructible
<
Value
>::
value
,
""
);
#ifndef _MSC_VER
static_assert
(
!
std
::
is_copy_constructible
<
Value
>::
value
,
""
);
#endif
static_assert
(
std
::
is_move_constructible
<
Value
>::
value
,
""
);
#ifndef _MSC_VER
static_assert
(
std
::
is_nothrow_constructible
<
Value
>::
value
,
""
);
static_assert
(
std
::
is_nothrow_default_constructible
<
Value
>::
value
,
""
);
#endif
static_assert
(
!
std
::
is_nothrow_copy_constructible
<
Value
>::
value
,
""
);
#ifndef _MSC_VER
static_assert
(
std
::
is_nothrow_move_constructible
<
Value
>::
value
,
""
);
#endif
static_assert
(
std
::
is_assignable
<
Value
,
Value
>::
value
,
""
);
#ifndef _MSC_VER
static_assert
(
!
std
::
is_copy_assignable
<
Value
>::
value
,
""
);
#endif
static_assert
(
std
::
is_move_assignable
<
Value
>::
value
,
""
);
#ifndef _MSC_VER
static_assert
(
std
::
is_nothrow_assignable
<
Value
,
Value
>::
value
,
""
);
#endif
static_assert
(
!
std
::
is_nothrow_copy_assignable
<
Value
>::
value
,
""
);
#ifndef _MSC_VER
static_assert
(
std
::
is_nothrow_move_assignable
<
Value
>::
value
,
""
);
#endif
static_assert
(
std
::
is_destructible
<
Value
>::
value
,
""
);
#ifndef _MSC_VER
static_assert
(
std
::
is_nothrow_destructible
<
Value
>::
value
,
""
);
#endif
}
TEST
(
Value
,
MoveConstructor
)
{
...
...
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