Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
W
WCCL
Manage
Activity
Members
Labels
Plan
Issues
4
Issue boards
Milestones
Wiki
Redmine
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Analysers
WCCL
Commits
6ae8cdbb
Commit
6ae8cdbb
authored
14 years ago
by
ilor
Browse files
Options
Downloads
Patches
Plain Diff
Make Position's default value be Nowhere
parent
13d507fd
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
libwccl/values/position.h
+5
-5
5 additions, 5 deletions
libwccl/values/position.h
tests/variables.cpp
+3
-3
3 additions, 3 deletions
tests/variables.cpp
with
8 additions
and
8 deletions
libwccl/values/position.h
+
5
−
5
View file @
6ae8cdbb
...
...
@@ -14,17 +14,17 @@ class Position : public Value
public:
WCCL_VALUE_PREAMBLE
explicit
Position
(
int
v
=
0
)
:
val_
(
v
)
{
}
typedef
int
value_type
;
static
const
int
Nowhere
=
boost
::
integer_traits
<
int
>::
const_min
;
static
const
int
Begin
=
boost
::
integer_traits
<
int
>::
const_min
+
1
;
static
const
int
End
=
boost
::
integer_traits
<
int
>::
const_max
;
explicit
Position
(
int
v
=
Nowhere
)
:
val_
(
v
)
{
}
const
int
&
get_value
()
const
{
return
val_
;
}
...
...
This diff is collapsed.
Click to expand it.
tests/variables.cpp
+
3
−
3
View file @
6ae8cdbb
...
...
@@ -170,9 +170,9 @@ BOOST_FIXTURE_TEST_CASE(reset_values, Vfix)
v
.
reset_values
();
BOOST_CHECK_EQUAL
(
v
.
get_value
<
Bool
>
(
"b1"
),
false
);
BOOST_CHECK_EQUAL
(
v
.
get_value
<
Bool
>
(
"b2"
),
false
);
BOOST_CHECK_EQUAL
(
v
.
get_value
<
Position
>
(
"p1"
),
0
);
BOOST_CHECK_EQUAL
(
v
.
get_value
<
Position
>
(
"p2"
),
0
);
BOOST_CHECK_EQUAL
(
v
.
get_value
<
Position
>
(
"p3"
),
0
);
BOOST_CHECK_EQUAL
(
v
.
get_value
<
Position
>
(
"p1"
),
Position
::
Nowhere
);
BOOST_CHECK_EQUAL
(
v
.
get_value
<
Position
>
(
"p2"
),
Position
::
Nowhere
);
BOOST_CHECK_EQUAL
(
v
.
get_value
<
Position
>
(
"p3"
),
Position
::
Nowhere
);
}
BOOST_FIXTURE_TEST_CASE
(
clone
,
Vfix
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
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