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
dea6a79b
Commit
dea6a79b
authored
6 years ago
by
Danilo Piparo
Browse files
Options
Downloads
Patches
Plain Diff
[DF] Add test for HasColumn and change test file name
parent
91fb25a5
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
tree/dataframe/test/CMakeLists.txt
+1
-1
1 addition, 1 deletion
tree/dataframe/test/CMakeLists.txt
tree/dataframe/test/dataframe_colnames.cxx
+28
-0
28 additions, 0 deletions
tree/dataframe/test/dataframe_colnames.cxx
with
29 additions
and
1 deletion
tree/dataframe/test/CMakeLists.txt
+
1
−
1
View file @
dea6a79b
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
#### C++ TESTS ####
#### C++ TESTS ####
ROOT_ADD_GTEST
(
dataframe_friends dataframe_friends.cxx LIBRARIES ROOTDataFrame
)
ROOT_ADD_GTEST
(
dataframe_friends dataframe_friends.cxx LIBRARIES ROOTDataFrame
)
ROOT_ADD_GTEST
(
dataframe_
alia
s dataframe_
alias
es.cxx LIBRARIES ROOTDataFrame
)
ROOT_ADD_GTEST
(
dataframe_
colname
s dataframe_
colnam
es.cxx LIBRARIES ROOTDataFrame
)
ROOT_ADD_GTEST
(
dataframe_cache dataframe_cache.cxx LIBRARIES ROOTDataFrame
)
ROOT_ADD_GTEST
(
dataframe_cache dataframe_cache.cxx LIBRARIES ROOTDataFrame
)
ROOT_ADD_GTEST
(
dataframe_callbacks dataframe_callbacks.cxx LIBRARIES ROOTDataFrame
)
ROOT_ADD_GTEST
(
dataframe_callbacks dataframe_callbacks.cxx LIBRARIES ROOTDataFrame
)
ROOT_ADD_GTEST
(
dataframe_histomodels dataframe_histomodels.cxx LIBRARIES ROOTDataFrame
)
ROOT_ADD_GTEST
(
dataframe_histomodels dataframe_histomodels.cxx LIBRARIES ROOTDataFrame
)
...
...
This diff is collapsed.
Click to expand it.
tree/dataframe/test/dataframe_
alias
es.cxx
→
tree/dataframe/test/dataframe_
colnam
es.cxx
+
28
−
0
View file @
dea6a79b
...
@@ -2,6 +2,34 @@
...
@@ -2,6 +2,34 @@
#include
"gtest/gtest.h"
#include
"gtest/gtest.h"
TEST
(
ColNames
,
HasColumn
)
{
// From scratch
ROOT
::
RDataFrame
fromScratch
(
1
);
EXPECT_TRUE
(
fromScratch
.
HasColumn
(
"rdfentry_"
));
EXPECT_TRUE
(
fromScratch
.
HasColumn
(
"rdfslot_"
));
auto
rdf
=
fromScratch
.
Define
(
"def"
,
[](){
return
0
;}).
Alias
(
"alias"
,
"def"
);
EXPECT_TRUE
(
rdf
.
HasColumn
(
"def"
));
EXPECT_TRUE
(
rdf
.
HasColumn
(
"alias"
));
// From tree
TTree
t
(
"t"
,
"t"
);
int
i
;
t
.
Branch
(
"branch"
,
&
i
);
ROOT
::
RDataFrame
fromTree
(
t
);
EXPECT_TRUE
(
fromTree
.
HasColumn
(
"branch"
));
// From Source
auto
fromSource
=
rdf
.
Cache
<
int
>
({
"def"
});
EXPECT_TRUE
(
fromSource
.
HasColumn
(
"def"
));
}
TEST
(
Aliases
,
DefineOnAlias
)
TEST
(
Aliases
,
DefineOnAlias
)
{
{
ROOT
::
RDataFrame
tdf
(
2
);
ROOT
::
RDataFrame
tdf
(
2
);
...
...
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