Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
F
fmt
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
fmt
Commits
4070c1d8
Commit
4070c1d8
authored
Aug 25, 2019
by
Victor Zverovich
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
PrepareTest -> CompileTest
parent
f8b59251
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
14 deletions
+14
-14
test/compile-test.cc
test/compile-test.cc
+14
-14
No files found.
test/compile-test.cc
View file @
4070c1d8
...
...
@@ -122,7 +122,7 @@ bool operator!=(const fmt::internal::format_part<char>& lhs,
}
FMT_END_NAMESPACE
TEST
(
Prepar
eTest
,
FormatPart_ComparisonOperators
)
{
TEST
(
Compil
eTest
,
FormatPart_ComparisonOperators
)
{
typedef
fmt
::
internal
::
format_part
<
char
>
format_part
;
typedef
fmt
::
internal
::
dynamic_format_specs
<
char
>
prepared_specs
;
...
...
@@ -227,7 +227,7 @@ TEST(PrepareTest, FormatPart_ComparisonOperators) {
}
}
TEST
(
Prepar
eTest
,
FormatPreparationHandler_OnText_AddsPartWithText
)
{
TEST
(
Compil
eTest
,
FormatPreparationHandler_OnText_AddsPartWithText
)
{
typedef
fmt
::
internal
::
format_part
<
char
>
format_part
;
typedef
StrictMock
<
mock_parts_collector
>
parts_mock
;
...
...
@@ -243,7 +243,7 @@ TEST(PrepareTest, FormatPreparationHandler_OnText_AddsPartWithText) {
handler
.
on_text
(
format
.
begin
(),
format
.
end
());
}
TEST
(
Prepar
eTest
,
FormatPreparationHandler_OnArgId_AddsPartWithIncrementedId
)
{
TEST
(
Compil
eTest
,
FormatPreparationHandler_OnArgId_AddsPartWithIncrementedId
)
{
typedef
fmt
::
internal
::
format_part
<
char
>
format_part
;
typedef
StrictMock
<
mock_parts_collector
>
parts_mock
;
...
...
@@ -261,7 +261,7 @@ TEST(PrepareTest, FormatPreparationHandler_OnArgId_AddsPartWithIncrementedId) {
handler
.
on_arg_id
();
}
TEST
(
Prepar
eTest
,
FormatPreparationHandler_OnArgId_AddsPartWithPassedId
)
{
TEST
(
Compil
eTest
,
FormatPreparationHandler_OnArgId_AddsPartWithPassedId
)
{
typedef
fmt
::
internal
::
format_part
<
char
>
format_part
;
typedef
StrictMock
<
mock_parts_collector
>
parts_mock
;
...
...
@@ -282,7 +282,7 @@ TEST(PrepareTest, FormatPreparationHandler_OnArgId_AddsPartWithPassedId) {
handler
.
on_arg_id
(
expected_third_arg_id
);
}
TEST
(
Prepar
eTest
,
FormatPreparationHandler_OnArgId_AddsPartWithPassedNamedId
)
{
TEST
(
Compil
eTest
,
FormatPreparationHandler_OnArgId_AddsPartWithPassedNamedId
)
{
typedef
fmt
::
internal
::
format_part
<
char
>
format_part
;
typedef
format_part
::
named_argument_id
named_argument_id
;
typedef
StrictMock
<
mock_parts_collector
>
parts_mock
;
...
...
@@ -316,7 +316,7 @@ TEST(PrepareTest, FormatPreparationHandler_OnArgId_AddsPartWithPassedNamedId) {
handler
.
on_arg_id
(
expected_third_arg_id
);
}
TEST
(
Prepar
eTest
,
TEST
(
Compil
eTest
,
FormatPreparationHandler_OnReplacementField_SetsEndOfArgumentId
)
{
typedef
fmt
::
internal
::
format_part
<
char
>
format_part
;
typedef
StrictMock
<
mock_parts_collector
>
parts_mock
;
...
...
@@ -338,7 +338,7 @@ TEST(PrepareTest,
}
TEST
(
Prepar
eTest
,
Compil
eTest
,
FormatPreparationHandlerLastPartArgIndex_OnFormatSpecs_UpdatesLastAddedPart
)
{
typedef
fmt
::
internal
::
format_part
<
char
>
format_part
;
typedef
StrictMock
<
mock_parts_collector
>
parts_mock
;
...
...
@@ -369,7 +369,7 @@ TEST(
}
TEST
(
Prepar
eTest
,
Compil
eTest
,
FormatPreparationHandlerLastPartNamedArgIndex_OnFormatSpecs_UpdatesLastAddedPart
)
{
typedef
fmt
::
internal
::
format_part
<
char
>
format_part
;
typedef
StrictMock
<
mock_parts_collector
>
parts_mock
;
...
...
@@ -415,7 +415,7 @@ void check_prepared_parts_type(Format format) {
"CompileTimePreparedPartsTypeProvider test failed"
);
}
TEST
(
Prepar
eTest
,
CompileTimePreparedPartsTypeProvider
)
{
TEST
(
Compil
eTest
,
CompileTimePreparedPartsTypeProvider
)
{
check_prepared_parts_type
<
1u
>
(
FMT_STRING
(
"text"
));
check_prepared_parts_type
<
1u
>
(
FMT_STRING
(
"{}"
));
check_prepared_parts_type
<
2u
>
(
FMT_STRING
(
"text{}"
));
...
...
@@ -467,7 +467,7 @@ class custom_parts_container {
parts
parts_
;
};
TEST
(
Prepar
eTest
,
PassStringLiteralFormat
)
{
TEST
(
Compil
eTest
,
PassStringLiteralFormat
)
{
const
auto
prepared
=
fmt
::
compile
<
int
>
(
"test {}"
);
EXPECT_EQ
(
"test 42"
,
fmt
::
format
(
prepared
,
42
));
const
auto
wprepared
=
fmt
::
compile
<
int
>
(
L"test {}"
);
...
...
@@ -475,7 +475,7 @@ TEST(PrepareTest, PassStringLiteralFormat) {
}
#if FMT_USE_CONSTEXPR
TEST
(
Prepar
eTest
,
PassCompileString
)
{
TEST
(
Compil
eTest
,
PassCompileString
)
{
const
auto
prepared
=
fmt
::
compile
<
int
>
(
FMT_STRING
(
"test {}"
));
EXPECT_EQ
(
"test 42"
,
fmt
::
format
(
prepared
,
42
));
const
auto
wprepared
=
fmt
::
compile
<
int
>
(
FMT_STRING
(
L"test {}"
));
...
...
@@ -483,7 +483,7 @@ TEST(PrepareTest, PassCompileString) {
}
#endif
TEST
(
Prepar
eTest
,
FormatToArrayOfChars
)
{
TEST
(
Compil
eTest
,
FormatToArrayOfChars
)
{
char
buffer
[
32
]
=
{
0
};
const
auto
prepared
=
fmt
::
compile
<
int
>
(
"4{}"
);
fmt
::
format_to
(
fmt
::
internal
::
make_checked
(
buffer
,
32
),
prepared
,
2
);
...
...
@@ -494,7 +494,7 @@ TEST(PrepareTest, FormatToArrayOfChars) {
EXPECT_EQ
(
std
::
wstring
(
L"42"
),
wbuffer
);
}
TEST
(
Prepar
eTest
,
FormatToIterator
)
{
TEST
(
Compil
eTest
,
FormatToIterator
)
{
std
::
string
s
(
2
,
' '
);
const
auto
prepared
=
fmt
::
compile
<
int
>
(
"4{}"
);
fmt
::
format_to
(
s
.
begin
(),
prepared
,
2
);
...
...
@@ -505,7 +505,7 @@ TEST(PrepareTest, FormatToIterator) {
EXPECT_EQ
(
L"42"
,
ws
);
}
TEST
(
Prepar
eTest
,
FormatToBackInserter
)
{
TEST
(
Compil
eTest
,
FormatToBackInserter
)
{
std
::
string
s
;
const
auto
prepared
=
fmt
::
compile
<
int
>
(
"4{}"
);
fmt
::
format_to
(
std
::
back_inserter
(
s
),
prepared
,
2
);
...
...
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