FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
xtensor/test/test_xinfo.cpp at master · xtensor-stack/xtensor · GitHub
xtensor-stack
xtensor
Repository navigation
Code
Issues
381
(381)
Pull requests
43
(43)
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
xtensor
/
test
/
test_xinfo.cpp
Copy path
More file actions
More file actions
Latest commit
History
History
History
40 lines (34 loc) · 1.29 KB
Breadcrumbs
xtensor
/
test
/
test_xinfo.cpp
Copy path
File metadata and controls
40 lines (34 loc) · 1.29 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
/*
**************************************************************************
* Copyright (c) Johan Mabille, Sylvain Corlay and Wolf Vollprecht *
* Copyright (c) QuantStack *
* *
* Distributed under the terms of the BSD 3-Clause License. *
* *
* The full license is in the file LICENSE, distributed with this software. *
***************************************************************************
*/
#
include
<
sstream
>
#
include
<
string
>
#
include
"
xtensor/containers/xarray.hpp
"
#
include
"
xtensor/io/xinfo.hpp
"
#
include
"
test_common_macros.hpp
"
namespace
xt
{
TEST
(xinfo, compiles)
{
xarray<
double
> test = {{
1
,
2
,
3
}, {
4
,
5
,
6
}};
std::stringstream ss;
ss <<
info
(test) << std::endl;
}
//
See https://github.com/xtensor-stack/xtensor/issues/2694
TEST
(xinfo,
typename
)
{
xarray<
double
> test = {{
1
,
2
,
3
}, {
4
,
5
,
6
}};
auto
t_s = type_to_string<
typename
decltype
(test)::value_type>();
std::string expected =
"
double
"
;
#
if
defined(__clang__)
WARN_EQ
(expected, t_s);
#
else
EXPECT_EQ
(expected, t_s);
#
endif
}
}
Back
|
FazBrowse Home
|
New Git URL