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
70e67ae0
Commit
70e67ae0
authored
May 29, 2021
by
Daniela Engert
Committed by
Victor Zverovich
Jun 01, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Re-enable module testing
Prepare for compilation with gcc (modules branch).
parent
ad972589
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
6 deletions
+20
-6
src/fmt.cc
src/fmt.cc
+8
-0
test/CMakeLists.txt
test/CMakeLists.txt
+2
-2
test/module-test.cc
test/module-test.cc
+10
-4
No files found.
src/fmt.cc
View file @
70e67ae0
...
@@ -75,6 +75,11 @@ export module fmt;
...
@@ -75,6 +75,11 @@ export module fmt;
#define FMT_END_DETAIL_NAMESPACE \
#define FMT_END_DETAIL_NAMESPACE \
} \
} \
export {
export {
#if defined(_MSC_FULL_VER) && _MSC_FULL_VER > 192930036
#define FMT_USE_NONTYPE_TEMPLATE_PARAMETERS 0
#endif
// all library-provided declarations and definitions
// all library-provided declarations and definitions
// must be in the module purview to be exported
// must be in the module purview to be exported
#include "fmt/args.h"
#include "fmt/args.h"
...
@@ -86,7 +91,10 @@ export module fmt;
...
@@ -86,7 +91,10 @@ export module fmt;
#include "fmt/printf.h"
#include "fmt/printf.h"
#include "fmt/xchar.h"
#include "fmt/xchar.h"
// gcc doesn't yet implement private module fragments
#if !FMT_GCC_VERSION
module
:
private
;
module
:
private
;
#endif
#include "format.cc"
#include "format.cc"
#include "os.cc"
#include "os.cc"
test/CMakeLists.txt
View file @
70e67ae0
...
@@ -94,10 +94,10 @@ if (FMT_CAN_MODULE)
...
@@ -94,10 +94,10 @@ if (FMT_CAN_MODULE)
$<BUILD_INTERFACE:
${
PROJECT_SOURCE_DIR
}
/include>
)
$<BUILD_INTERFACE:
${
PROJECT_SOURCE_DIR
}
/include>
)
enable_module
(
test-module
)
enable_module
(
test-module
)
#
add_fmt_test(module-test MODULE)
add_fmt_test
(
module-test MODULE
)
if
(
MSVC
)
if
(
MSVC
)
target_compile_options
(
test-module PRIVATE /utf-8
)
target_compile_options
(
test-module PRIVATE /utf-8
)
#
target_compile_options(module-test PRIVATE /utf-8)
target_compile_options
(
module-test PRIVATE /utf-8
)
endif
()
endif
()
endif
()
endif
()
...
...
test/module-test.cc
View file @
70e67ae0
...
@@ -9,6 +9,12 @@
...
@@ -9,6 +9,12 @@
// All Rights Reserved
// All Rights Reserved
// {fmt} module.
// {fmt} module.
#ifdef _MSC_FULL_VER
// hide some implementation bugs in msvc
// that are not essential to users of the module.
# define FMT_HIDE_MODULE_BUGS
#endif
#include <bit>
#include <bit>
#include <chrono>
#include <chrono>
#include <exception>
#include <exception>
...
@@ -404,10 +410,10 @@ TEST(module_test, color) {
...
@@ -404,10 +410,10 @@ TEST(module_test, color) {
}
}
TEST
(
module_test
,
cstring_view
)
{
TEST
(
module_test
,
cstring_view
)
{
fmt
::
cstring_view
nsv
(
"fmt"
)
;
auto
s
=
"fmt"
;
EXPECT_EQ
(
"fmt"
,
nsv
.
c_str
());
EXPECT_EQ
(
s
,
fmt
::
cstring_view
(
s
)
.
c_str
());
fmt
::
wcstring_view
wsv
(
L"fmt"
)
;
auto
w
=
L"fmt"
;
EXPECT_EQ
(
L"fmt"
,
wsv
.
c_str
());
EXPECT_EQ
(
w
,
fmt
::
wcstring_view
(
w
)
.
c_str
());
}
}
TEST
(
module_test
,
buffered_file
)
{
TEST
(
module_test
,
buffered_file
)
{
...
...
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