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
88ff2870
Commit
88ff2870
authored
2 years ago
by
Sergey Linev
Browse files
Options
Downloads
Patches
Plain Diff
Use override in several tests
parent
15182897
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
test/tcollex.cxx
+13
-10
13 additions, 10 deletions
test/tcollex.cxx
tree/tree/test/SillyStruct.h
+1
-1
1 addition, 1 deletion
tree/tree/test/SillyStruct.h
with
14 additions
and
11 deletions
test/tcollex.cxx
+
13
−
10
View file @
88ff2870
...
...
@@ -31,16 +31,19 @@ public:
~
TObjNum
()
{
Printf
(
"~TObjNum = %d"
,
num
);
}
void
SetNum
(
int
i
)
{
num
=
i
;
}
int
GetNum
()
{
return
num
;
}
void
Print
(
Option_t
*
)
const
{
Printf
(
"TObjNum = %d"
,
num
);
}
ULong_t
Hash
()
const
{
return
num
;
}
Bool_t
IsEqual
(
const
TObject
*
obj
)
const
{
return
num
==
((
TObjNum
*
)
obj
)
->
num
;
}
Bool_t
IsSortable
()
const
{
return
kTRUE
;
}
Int_t
Compare
(
const
TObject
*
obj
)
const
{
if
(
num
>
((
TObjNum
*
)
obj
)
->
num
)
return
1
;
else
if
(
num
<
((
TObjNum
*
)
obj
)
->
num
)
return
-
1
;
else
return
0
;
}
void
Print
(
Option_t
*
)
const
override
{
Printf
(
"TObjNum = %d"
,
num
);
}
ULong_t
Hash
()
const
override
{
return
num
;
}
Bool_t
IsEqual
(
const
TObject
*
obj
)
const
override
{
return
num
==
((
TObjNum
*
)
obj
)
->
num
;
}
Bool_t
IsSortable
()
const
override
{
return
kTRUE
;
}
Int_t
Compare
(
const
TObject
*
obj
)
const
override
{
if
(
num
>
((
TObjNum
*
)
obj
)
->
num
)
return
1
;
else
if
(
num
<
((
TObjNum
*
)
obj
)
->
num
)
return
-
1
;
else
return
0
;
}
};
void
Test_TObjArray
()
...
...
This diff is collapsed.
Click to expand it.
tree/tree/test/SillyStruct.h
+
1
−
1
View file @
88ff2870
...
...
@@ -13,5 +13,5 @@ public:
int
i
;
double
d
;
ClassDef
(
SillyStruct
,
1
)
ClassDef
Override
(
SillyStruct
,
1
)
};
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