Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
R
Root
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Admin message
为了安全,强烈建议开启2FA双因子认证:User Settings -> Account -> Enable two-factor authentication!!!
Show more breadcrumbs
cxwx
Root
Commits
1d326b1b
Commit
1d326b1b
authored
6 years ago
by
Stefan Wunsch
Committed by
Enric Tejedor
6 years ago
Browse files
Options
Downloads
Patches
Plain Diff
[PyROOT exp] Add test for string_view backport
parent
fee4cfa3
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
bindings/pyroot_experimental/PyROOT/test/CMakeLists.txt
+3
-0
3 additions, 0 deletions
bindings/pyroot_experimental/PyROOT/test/CMakeLists.txt
bindings/pyroot_experimental/PyROOT/test/string_view_backport.py
+21
-0
21 additions, 0 deletions
...s/pyroot_experimental/PyROOT/test/string_view_backport.py
with
24 additions
and
0 deletions
bindings/pyroot_experimental/PyROOT/test/CMakeLists.txt
+
3
−
0
View file @
1d326b1b
...
@@ -81,3 +81,6 @@ if(roofit)
...
@@ -81,3 +81,6 @@ if(roofit)
# RooDataHist pythonisations
# RooDataHist pythonisations
ROOT_ADD_PYUNITTEST
(
pyroot_pyz_roodatahist_ploton roodatahist_ploton.py
)
ROOT_ADD_PYUNITTEST
(
pyroot_pyz_roodatahist_ploton roodatahist_ploton.py
)
endif
()
endif
()
# std::string_view backport in CPyCppyy
ROOT_ADD_PYUNITTEST
(
pyroot_string_view_backport string_view_backport.py
)
This diff is collapsed.
Click to expand it.
bindings/pyroot_experimental/PyROOT/test/string_view_backport.py
0 → 100644
+
21
−
0
View file @
1d326b1b
import
unittest
import
ROOT
class
StringViewBackport
(
unittest
.
TestCase
):
"""
Test the availability of std::string_view since ROOT has a backport to C++11
"""
def
test_interpreter
(
self
):
ROOT
.
gInterpreter
.
Declare
(
"
std::string TestStringViewBackport(std::string_view x) { return std::string(x); }
"
)
x
=
ROOT
.
TestStringViewBackport
(
"
foo
"
)
self
.
assertEqual
(
str
(
x
),
"
foo
"
)
def
test_rdataframe
(
self
):
df
=
ROOT
.
ROOT
.
RDataFrame
(
"
tree
"
,
"
file.root
"
)
self
.
assertEqual
(
str
(
df
),
"
A data frame built on top of the tree dataset.
"
)
if
__name__
==
'
__main__
'
:
unittest
.
main
()
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment