Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
Base
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
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
Show more breadcrumbs
CoMISo
Base
Commits
5551b553
Commit
5551b553
authored
3 years ago
by
Martin Marinov
Committed by
GitHub Enterprise
3 years ago
Browse files
Options
Downloads
Patches
Plain Diff
REFORM-1097 Fix Test::Checksum::Compare (#64)
parent
682d7172
No related branches found
No related tags found
1 merge request
!14
Merge latest changes to Base from ReForm
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
Test/TestChecksumCompare.cc
+1
-5
1 addition, 5 deletions
Test/TestChecksumCompare.cc
Test/TestChecksumCompare.hh
+7
-8
7 additions, 8 deletions
Test/TestChecksumCompare.hh
with
8 additions
and
13 deletions
Test/TestChecksumCompare.cc
+
1
−
5
View file @
5551b553
...
@@ -356,10 +356,6 @@ void Compare::Impl::check_equal() const
...
@@ -356,10 +356,6 @@ void Compare::Impl::check_equal() const
TEST_THROW_ERROR
(
TEST_CHECKSUM_COMPARE_DIFFERENCES
);
TEST_THROW_ERROR
(
TEST_CHECKSUM_COMPARE_DIFFERENCES
);
}
}
}
}
Compare
::
Impl
*
Compare
::
impl_
=
nullptr
;
bool
Compare
::
owned_
=
false
;
void
Compare
::
make
()
void
Compare
::
make
()
{
{
if
(
impl_
!=
nullptr
)
if
(
impl_
!=
nullptr
)
...
@@ -371,7 +367,7 @@ void Compare::make()
...
@@ -371,7 +367,7 @@ void Compare::make()
void
Compare
::
set
(
Compare
&
_othr
)
void
Compare
::
set
(
Compare
&
_othr
)
{
{
TEST_THROW_ERROR_if
(
TEST_THROW_ERROR_if
(
_othr
.
impl_
!
=
nullptr
,
TEST_CHECKSUM_COMPARE_INCOMING_IMPL_NULL
);
_othr
.
impl_
=
=
nullptr
,
TEST_CHECKSUM_COMPARE_INCOMING_IMPL_NULL
);
TEST_THROW_ERROR_if
(
impl_
!=
nullptr
,
TEST_CHECKSUM_COMPARE_IMPL_ALREADY_SET
);
TEST_THROW_ERROR_if
(
impl_
!=
nullptr
,
TEST_CHECKSUM_COMPARE_IMPL_ALREADY_SET
);
impl_
=
_othr
.
impl_
;
impl_
=
_othr
.
impl_
;
...
...
This diff is collapsed.
Click to expand it.
Test/TestChecksumCompare.hh
+
7
−
8
View file @
5551b553
...
@@ -41,15 +41,14 @@ linked statically, i.e., they share the same binary.
...
@@ -41,15 +41,14 @@ linked statically, i.e., they share the same binary.
class
Compare
class
Compare
{
{
public:
public:
//! Destroy the owned instance
~
Compare
();
//! Make and store the unique instance
//! Make and store the unique instance
static
void
make
();
void
make
();
//! Set an instance made in another binary
//! Set an instance made in another binary
static
void
set
(
Compare
&
);
void
set
(
Compare
&
);
public:
//! Destroy the owned instance
~
Compare
();
//! Set the report pair to compare
//! Set the report pair to compare
void
set_reports
(
const
fs
::
path
&
_left_path
,
const
fs
::
path
&
_right_path
);
void
set_reports
(
const
fs
::
path
&
_left_path
,
const
fs
::
path
&
_right_path
);
...
@@ -76,8 +75,8 @@ private:
...
@@ -76,8 +75,8 @@ private:
private:
private:
class
Impl
;
class
Impl
;
static
Impl
*
impl_
;
// shared implementation
pointer
Impl
*
impl_
=
nullptr
;
// shared implementation
static
bool
owned_
;
// own implementation or not
bool
owned_
=
false
;
// own implementation or not
};
};
/*!
/*!
...
...
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