Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
openstructure
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container registry
Model registry
Analyze
Contributor 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
schwede
openstructure
Commits
0f75b5d2
Commit
0f75b5d2
authored
12 years ago
by
Ansgar Philippsen
Browse files
Options
Downloads
Patches
Plain Diff
fix for previous fix that failed to fix previous fix (all in the name of anal type checking)
parent
a23842e3
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
modules/gfx/tests/test_color.cc
+101
-99
101 additions, 99 deletions
modules/gfx/tests/test_color.cc
with
101 additions
and
99 deletions
modules/gfx/tests/test_color.cc
+
101
−
99
View file @
0f75b5d2
...
...
@@ -46,135 +46,137 @@ namespace {
}
}
#define FIXED_BOOST_WARN_CLOSE(F1,F2,F3) BOOST_WARN_CLOSE(static_cast<float>(F1), static_cast<float>(F2), static_cast<float>(F3))
BOOST_AUTO_TEST_SUITE
(
gfx
)
BOOST_AUTO_TEST_CASE
(
default_color
)
{
Color
c
;
BOOST_WARN_CLOSE
(
c
.
GetRed
(),
1.0
f
,
tolerance
);
BOOST_WARN_CLOSE
(
c
.
GetGreen
(),
1.0
f
,
tolerance
);
BOOST_WARN_CLOSE
(
c
.
GetBlue
(),
1.0
f
,
tolerance
);
BOOST_WARN_CLOSE
(
c
.
GetAlpha
(),
1.0
f
,
tolerance
);
BOOST_WARN_CLOSE
(
c
.
GetHue
(),
0.0
f
,
tolerance
);
BOOST_WARN_CLOSE
(
c
.
GetSat
(),
0.0
f
,
tolerance
);
BOOST_WARN_CLOSE
(
c
.
GetVal
(),
1.0
f
,
tolerance
);
FIXED_
BOOST_WARN_CLOSE
(
c
.
GetRed
(),
1.0
f
,
tolerance
);
FIXED_
BOOST_WARN_CLOSE
(
c
.
GetGreen
(),
1.0
f
,
tolerance
);
FIXED_
BOOST_WARN_CLOSE
(
c
.
GetBlue
(),
1.0
f
,
tolerance
);
FIXED_
BOOST_WARN_CLOSE
(
c
.
GetAlpha
(),
1.0
f
,
tolerance
);
FIXED_
BOOST_WARN_CLOSE
(
c
.
GetHue
(),
0.0
f
,
tolerance
);
FIXED_
BOOST_WARN_CLOSE
(
c
.
GetSat
(),
0.0
f
,
tolerance
);
FIXED_
BOOST_WARN_CLOSE
(
c
.
GetVal
(),
1.0
f
,
tolerance
);
}
BOOST_AUTO_TEST_CASE
(
set_rgb
)
{
Color
c
;
c
=
RGB
(
1.0
f
,
0.0
f
,
0.0
f
);
// red
BOOST_WARN_CLOSE
(
c
.
GetAlpha
(),
1.0
f
,
tolerance
);
BOOST_WARN_CLOSE
(
c
.
GetRed
(),
1.0
f
,
tolerance
);
BOOST_WARN_CLOSE
(
c
.
GetGreen
(),
0.0
f
,
tolerance
);
BOOST_WARN_CLOSE
(
c
.
GetBlue
(),
0.0
f
,
tolerance
);
BOOST_WARN_CLOSE
(
c
.
GetHue
(),
0.0
f
/
6.0
f
,
tolerance
);
BOOST_WARN_CLOSE
(
c
.
GetSat
(),
1.0
f
,
tolerance
);
BOOST_WARN_CLOSE
(
c
.
GetVal
(),
1.0
f
,
tolerance
);
FIXED_
BOOST_WARN_CLOSE
(
c
.
GetAlpha
(),
1.0
f
,
tolerance
);
FIXED_
BOOST_WARN_CLOSE
(
c
.
GetRed
(),
1.0
f
,
tolerance
);
FIXED_
BOOST_WARN_CLOSE
(
c
.
GetGreen
(),
0.0
f
,
tolerance
);
FIXED_
BOOST_WARN_CLOSE
(
c
.
GetBlue
(),
0.0
f
,
tolerance
);
FIXED_
BOOST_WARN_CLOSE
(
c
.
GetHue
(),
0.0
f
/
6.0
f
,
tolerance
);
FIXED_
BOOST_WARN_CLOSE
(
c
.
GetSat
(),
1.0
f
,
tolerance
);
FIXED_
BOOST_WARN_CLOSE
(
c
.
GetVal
(),
1.0
f
,
tolerance
);
c
=
RGB
(
1.0
f
,
1.0
f
,
0.0
f
);
// yellow
BOOST_WARN_CLOSE
(
c
.
GetRed
(),
1.0
f
,
tolerance
);
BOOST_WARN_CLOSE
(
c
.
GetGreen
(),
1.0
f
,
tolerance
);
BOOST_WARN_CLOSE
(
c
.
GetBlue
(),
0.0
f
,
tolerance
);
BOOST_WARN_CLOSE
(
c
.
GetHue
(),
1.0
f
/
6.0
f
,
tolerance
);
BOOST_WARN_CLOSE
(
c
.
GetSat
(),
1.0
f
,
tolerance
);
BOOST_WARN_CLOSE
(
c
.
GetVal
(),
1.0
f
,
tolerance
);
FIXED_
BOOST_WARN_CLOSE
(
c
.
GetRed
(),
1.0
f
,
tolerance
);
FIXED_
BOOST_WARN_CLOSE
(
c
.
GetGreen
(),
1.0
f
,
tolerance
);
FIXED_
BOOST_WARN_CLOSE
(
c
.
GetBlue
(),
0.0
f
,
tolerance
);
FIXED_
BOOST_WARN_CLOSE
(
c
.
GetHue
(),
1.0
f
/
6.0
f
,
tolerance
);
FIXED_
BOOST_WARN_CLOSE
(
c
.
GetSat
(),
1.0
f
,
tolerance
);
FIXED_
BOOST_WARN_CLOSE
(
c
.
GetVal
(),
1.0
f
,
tolerance
);
c
=
RGB
(
0.0
f
,
1.0
f
,
0.0
f
);
// green
BOOST_WARN_CLOSE
(
c
.
GetRed
(),
0.0
f
,
tolerance
);
BOOST_WARN_CLOSE
(
c
.
GetGreen
(),
1.0
f
,
tolerance
);
BOOST_WARN_CLOSE
(
c
.
GetBlue
(),
0.0
f
,
tolerance
);
BOOST_WARN_CLOSE
(
c
.
GetHue
(),
2.0
f
/
6.0
f
,
tolerance
);
BOOST_WARN_CLOSE
(
c
.
GetSat
(),
1.0
f
,
tolerance
);
BOOST_WARN_CLOSE
(
c
.
GetVal
(),
1.0
f
,
tolerance
);
FIXED_
BOOST_WARN_CLOSE
(
c
.
GetRed
(),
0.0
f
,
tolerance
);
FIXED_
BOOST_WARN_CLOSE
(
c
.
GetGreen
(),
1.0
f
,
tolerance
);
FIXED_
BOOST_WARN_CLOSE
(
c
.
GetBlue
(),
0.0
f
,
tolerance
);
FIXED_
BOOST_WARN_CLOSE
(
c
.
GetHue
(),
2.0
f
/
6.0
f
,
tolerance
);
FIXED_
BOOST_WARN_CLOSE
(
c
.
GetSat
(),
1.0
f
,
tolerance
);
FIXED_
BOOST_WARN_CLOSE
(
c
.
GetVal
(),
1.0
f
,
tolerance
);
c
=
RGB
(
0.0
f
,
1.0
f
,
1.0
f
);
// cyan
BOOST_WARN_CLOSE
(
c
.
GetRed
(),
0.0
f
,
tolerance
);
BOOST_WARN_CLOSE
(
c
.
GetGreen
(),
1.0
f
,
tolerance
);
BOOST_WARN_CLOSE
(
c
.
GetBlue
(),
1.0
f
,
tolerance
);
BOOST_WARN_CLOSE
(
c
.
GetHue
(),
3.0
f
/
6.0
f
,
tolerance
);
BOOST_WARN_CLOSE
(
c
.
GetSat
(),
1.0
f
,
tolerance
);
BOOST_WARN_CLOSE
(
c
.
GetVal
(),
1.0
f
,
tolerance
);
FIXED_
BOOST_WARN_CLOSE
(
c
.
GetRed
(),
0.0
f
,
tolerance
);
FIXED_
BOOST_WARN_CLOSE
(
c
.
GetGreen
(),
1.0
f
,
tolerance
);
FIXED_
BOOST_WARN_CLOSE
(
c
.
GetBlue
(),
1.0
f
,
tolerance
);
FIXED_
BOOST_WARN_CLOSE
(
c
.
GetHue
(),
3.0
f
/
6.0
f
,
tolerance
);
FIXED_
BOOST_WARN_CLOSE
(
c
.
GetSat
(),
1.0
f
,
tolerance
);
FIXED_
BOOST_WARN_CLOSE
(
c
.
GetVal
(),
1.0
f
,
tolerance
);
c
=
RGB
(
0.0
f
,
0.0
f
,
1.0
f
);
// blue
BOOST_WARN_CLOSE
(
c
.
GetRed
(),
0.0
f
,
tolerance
);
BOOST_WARN_CLOSE
(
c
.
GetGreen
(),
0.0
f
,
tolerance
);
BOOST_WARN_CLOSE
(
c
.
GetBlue
(),
1.0
f
,
tolerance
);
BOOST_WARN_CLOSE
(
c
.
GetHue
(),
4.0
f
/
6.0
f
,
tolerance
);
BOOST_WARN_CLOSE
(
c
.
GetSat
(),
1.0
f
,
tolerance
);
BOOST_WARN_CLOSE
(
c
.
GetVal
(),
1.0
f
,
tolerance
);
FIXED_
BOOST_WARN_CLOSE
(
c
.
GetRed
(),
0.0
f
,
tolerance
);
FIXED_
BOOST_WARN_CLOSE
(
c
.
GetGreen
(),
0.0
f
,
tolerance
);
FIXED_
BOOST_WARN_CLOSE
(
c
.
GetBlue
(),
1.0
f
,
tolerance
);
FIXED_
BOOST_WARN_CLOSE
(
c
.
GetHue
(),
4.0
f
/
6.0
f
,
tolerance
);
FIXED_
BOOST_WARN_CLOSE
(
c
.
GetSat
(),
1.0
f
,
tolerance
);
FIXED_
BOOST_WARN_CLOSE
(
c
.
GetVal
(),
1.0
f
,
tolerance
);
c
=
RGB
(
1.0
f
,
0.0
f
,
1.0
f
);
// purple
BOOST_WARN_CLOSE
(
c
.
GetRed
(),
1.0
f
,
tolerance
);
BOOST_WARN_CLOSE
(
c
.
GetGreen
(),
0.0
f
,
tolerance
);
BOOST_WARN_CLOSE
(
c
.
GetBlue
(),
1.0
f
,
tolerance
);
BOOST_WARN_CLOSE
(
c
.
GetHue
(),
5.0
f
/
6.0
f
,
tolerance
);
BOOST_WARN_CLOSE
(
c
.
GetSat
(),
1.0
f
,
tolerance
);
BOOST_WARN_CLOSE
(
c
.
GetVal
(),
1.0
f
,
tolerance
);
FIXED_
BOOST_WARN_CLOSE
(
c
.
GetRed
(),
1.0
f
,
tolerance
);
FIXED_
BOOST_WARN_CLOSE
(
c
.
GetGreen
(),
0.0
f
,
tolerance
);
FIXED_
BOOST_WARN_CLOSE
(
c
.
GetBlue
(),
1.0
f
,
tolerance
);
FIXED_
BOOST_WARN_CLOSE
(
c
.
GetHue
(),
5.0
f
/
6.0
f
,
tolerance
);
FIXED_
BOOST_WARN_CLOSE
(
c
.
GetSat
(),
1.0
f
,
tolerance
);
FIXED_
BOOST_WARN_CLOSE
(
c
.
GetVal
(),
1.0
f
,
tolerance
);
}
BOOST_AUTO_TEST_CASE
(
set_hsv
)
{
Color
c
;
c
=
HSV
(
0.0
f
/
6.0
,
1.0
f
,
1.0
f
);
// red
BOOST_WARN_CLOSE
(
c
.
GetAlpha
(),
1.0
f
,
tolerance
);
BOOST_WARN_CLOSE
(
c
.
GetRed
(),
1.0
f
,
tolerance
);
BOOST_WARN_CLOSE
(
c
.
GetGreen
(),
0.0
f
,
tolerance
);
BOOST_WARN_CLOSE
(
c
.
GetBlue
(),
0.0
f
,
tolerance
);
BOOST_WARN_CLOSE
(
c
.
GetHue
(),
0.0
f
/
6.0
,
tolerance
);
BOOST_WARN_CLOSE
(
c
.
GetSat
(),
1.0
f
,
tolerance
);
BOOST_WARN_CLOSE
(
c
.
GetVal
(),
1.0
f
,
tolerance
);
FIXED_
BOOST_WARN_CLOSE
(
c
.
GetAlpha
(),
1.0
f
,
tolerance
);
FIXED_
BOOST_WARN_CLOSE
(
c
.
GetRed
(),
1.0
f
,
tolerance
);
FIXED_
BOOST_WARN_CLOSE
(
c
.
GetGreen
(),
0.0
f
,
tolerance
);
FIXED_
BOOST_WARN_CLOSE
(
c
.
GetBlue
(),
0.0
f
,
tolerance
);
FIXED_
BOOST_WARN_CLOSE
(
c
.
GetHue
(),
0.0
f
/
6.0
f
,
tolerance
);
FIXED_
BOOST_WARN_CLOSE
(
c
.
GetSat
(),
1.0
f
,
tolerance
);
FIXED_
BOOST_WARN_CLOSE
(
c
.
GetVal
(),
1.0
f
,
tolerance
);
c
=
HSV
(
0.0
f
/
6.0
,
0.5
,
1.0
f
);
// light red
BOOST_WARN_CLOSE
(
c
.
GetRed
(),
1.0
f
,
tolerance
);
BOOST_WARN_CLOSE
(
c
.
GetGreen
(),
0.5
f
,
tolerance
);
BOOST_WARN_CLOSE
(
c
.
GetBlue
(),
0.5
f
,
tolerance
);
BOOST_WARN_CLOSE
(
c
.
GetHue
(),
0.0
f
/
6.0
f
,
tolerance
);
BOOST_WARN_CLOSE
(
c
.
GetSat
(),
0.5
f
,
tolerance
);
BOOST_WARN_CLOSE
(
c
.
GetVal
(),
1.0
f
,
tolerance
);
FIXED_
BOOST_WARN_CLOSE
(
c
.
GetRed
(),
1.0
f
,
tolerance
);
FIXED_
BOOST_WARN_CLOSE
(
c
.
GetGreen
(),
0.5
f
,
tolerance
);
FIXED_
BOOST_WARN_CLOSE
(
c
.
GetBlue
(),
0.5
f
,
tolerance
);
FIXED_
BOOST_WARN_CLOSE
(
c
.
GetHue
(),
0.0
f
/
6.0
f
,
tolerance
);
FIXED_
BOOST_WARN_CLOSE
(
c
.
GetSat
(),
0.5
f
,
tolerance
);
FIXED_
BOOST_WARN_CLOSE
(
c
.
GetVal
(),
1.0
f
,
tolerance
);
c
=
HSV
(
1.0
f
/
6.0
,
1.0
f
,
1.0
f
);
// yellow
BOOST_WARN_CLOSE
(
c
.
GetRed
(),
1.0
f
,
tolerance
);
BOOST_WARN_CLOSE
(
c
.
GetGreen
(),
1.0
f
,
tolerance
);
BOOST_WARN_CLOSE
(
c
.
GetBlue
(),
0.0
f
,
tolerance
);
BOOST_WARN_CLOSE
(
c
.
GetHue
(),
1.0
f
/
6.0
,
tolerance
);
BOOST_WARN_CLOSE
(
c
.
GetSat
(),
1.0
f
,
tolerance
);
BOOST_WARN_CLOSE
(
c
.
GetVal
(),
1.0
f
,
tolerance
);
FIXED_
BOOST_WARN_CLOSE
(
c
.
GetRed
(),
1.0
f
,
tolerance
);
FIXED_
BOOST_WARN_CLOSE
(
c
.
GetGreen
(),
1.0
f
,
tolerance
);
FIXED_
BOOST_WARN_CLOSE
(
c
.
GetBlue
(),
0.0
f
,
tolerance
);
FIXED_
BOOST_WARN_CLOSE
(
c
.
GetHue
(),
1.0
f
/
6.0
,
tolerance
);
FIXED_
BOOST_WARN_CLOSE
(
c
.
GetSat
(),
1.0
f
,
tolerance
);
FIXED_
BOOST_WARN_CLOSE
(
c
.
GetVal
(),
1.0
f
,
tolerance
);
c
=
HSV
(
2.0
/
6.0
,
1.0
f
,
1.0
f
);
// green
BOOST_WARN_CLOSE
(
c
.
GetRed
(),
0.0
f
,
tolerance
);
BOOST_WARN_CLOSE
(
c
.
GetGreen
(),
1.0
f
,
tolerance
);
BOOST_WARN_CLOSE
(
c
.
GetBlue
(),
0.0
f
,
tolerance
);
BOOST_WARN_CLOSE
(
c
.
GetHue
(),
2.0
f
/
6.0
f
,
tolerance
);
BOOST_WARN_CLOSE
(
c
.
GetSat
(),
1.0
f
,
tolerance
);
BOOST_WARN_CLOSE
(
c
.
GetVal
(),
1.0
f
,
tolerance
);
FIXED_
BOOST_WARN_CLOSE
(
c
.
GetRed
(),
0.0
f
,
tolerance
);
FIXED_
BOOST_WARN_CLOSE
(
c
.
GetGreen
(),
1.0
f
,
tolerance
);
FIXED_
BOOST_WARN_CLOSE
(
c
.
GetBlue
(),
0.0
f
,
tolerance
);
FIXED_
BOOST_WARN_CLOSE
(
c
.
GetHue
(),
2.0
f
/
6.0
f
,
tolerance
);
FIXED_
BOOST_WARN_CLOSE
(
c
.
GetSat
(),
1.0
f
,
tolerance
);
FIXED_
BOOST_WARN_CLOSE
(
c
.
GetVal
(),
1.0
f
,
tolerance
);
c
=
HSV
(
2.0
/
6.0
,
0.5
,
1.0
f
);
// light green
BOOST_WARN_CLOSE
(
c
.
GetRed
(),
0.5
f
,
tolerance
);
BOOST_WARN_CLOSE
(
c
.
GetGreen
(),
1.0
f
,
tolerance
);
BOOST_WARN_CLOSE
(
c
.
GetBlue
(),
0.5
f
,
tolerance
);
BOOST_WARN_CLOSE
(
c
.
GetHue
(),
2.0
f
/
6.0
f
,
tolerance
);
BOOST_WARN_CLOSE
(
c
.
GetSat
(),
0.5
f
,
tolerance
);
BOOST_WARN_CLOSE
(
c
.
GetVal
(),
1.0
f
,
tolerance
);
FIXED_
BOOST_WARN_CLOSE
(
c
.
GetRed
(),
0.5
f
,
tolerance
);
FIXED_
BOOST_WARN_CLOSE
(
c
.
GetGreen
(),
1.0
f
,
tolerance
);
FIXED_
BOOST_WARN_CLOSE
(
c
.
GetBlue
(),
0.5
f
,
tolerance
);
FIXED_
BOOST_WARN_CLOSE
(
c
.
GetHue
(),
2.0
f
/
6.0
f
,
tolerance
);
FIXED_
BOOST_WARN_CLOSE
(
c
.
GetSat
(),
0.5
f
,
tolerance
);
FIXED_
BOOST_WARN_CLOSE
(
c
.
GetVal
(),
1.0
f
,
tolerance
);
c
=
HSV
(
3.0
/
6.0
,
1.0
f
,
1.0
f
);
// cyan
BOOST_WARN_CLOSE
(
c
.
GetRed
(),
0.0
f
,
tolerance
);
BOOST_WARN_CLOSE
(
c
.
GetGreen
(),
1.0
f
,
tolerance
);
BOOST_WARN_CLOSE
(
c
.
GetBlue
(),
1.0
f
,
tolerance
);
BOOST_WARN_CLOSE
(
c
.
GetHue
(),
3.0
f
/
6.0
f
,
tolerance
);
BOOST_WARN_CLOSE
(
c
.
GetSat
(),
1.0
f
,
tolerance
);
BOOST_WARN_CLOSE
(
c
.
GetVal
(),
1.0
f
,
tolerance
);
FIXED_
BOOST_WARN_CLOSE
(
c
.
GetRed
(),
0.0
f
,
tolerance
);
FIXED_
BOOST_WARN_CLOSE
(
c
.
GetGreen
(),
1.0
f
,
tolerance
);
FIXED_
BOOST_WARN_CLOSE
(
c
.
GetBlue
(),
1.0
f
,
tolerance
);
FIXED_
BOOST_WARN_CLOSE
(
c
.
GetHue
(),
3.0
f
/
6.0
f
,
tolerance
);
FIXED_
BOOST_WARN_CLOSE
(
c
.
GetSat
(),
1.0
f
,
tolerance
);
FIXED_
BOOST_WARN_CLOSE
(
c
.
GetVal
(),
1.0
f
,
tolerance
);
c
=
HSV
(
4.0
/
6.0
,
1.0
f
,
1.0
f
);
// blue
BOOST_WARN_CLOSE
(
c
.
GetRed
(),
0.0
f
,
tolerance
);
BOOST_WARN_CLOSE
(
c
.
GetGreen
(),
0.0
f
,
tolerance
);
BOOST_WARN_CLOSE
(
c
.
GetBlue
(),
1.0
f
,
tolerance
);
BOOST_WARN_CLOSE
(
c
.
GetHue
(),
4.0
f
/
6.0
f
,
tolerance
);
BOOST_WARN_CLOSE
(
c
.
GetSat
(),
1.0
f
,
tolerance
);
BOOST_WARN_CLOSE
(
c
.
GetVal
(),
1.0
f
,
tolerance
);
FIXED_
BOOST_WARN_CLOSE
(
c
.
GetRed
(),
0.0
f
,
tolerance
);
FIXED_
BOOST_WARN_CLOSE
(
c
.
GetGreen
(),
0.0
f
,
tolerance
);
FIXED_
BOOST_WARN_CLOSE
(
c
.
GetBlue
(),
1.0
f
,
tolerance
);
FIXED_
BOOST_WARN_CLOSE
(
c
.
GetHue
(),
4.0
f
/
6.0
f
,
tolerance
);
FIXED_
BOOST_WARN_CLOSE
(
c
.
GetSat
(),
1.0
f
,
tolerance
);
FIXED_
BOOST_WARN_CLOSE
(
c
.
GetVal
(),
1.0
f
,
tolerance
);
c
=
HSV
(
4.0
/
6.0
,
0.5
,
1.0
f
);
// light blue
BOOST_WARN_CLOSE
(
c
.
GetRed
(),
0.5
f
,
tolerance
);
BOOST_WARN_CLOSE
(
c
.
GetGreen
(),
0.5
f
,
tolerance
);
BOOST_WARN_CLOSE
(
c
.
GetBlue
(),
1.0
f
,
tolerance
);
BOOST_WARN_CLOSE
(
c
.
GetHue
(),
4.0
f
/
6.0
f
,
tolerance
);
BOOST_WARN_CLOSE
(
c
.
GetSat
(),
0.5
f
,
tolerance
);
BOOST_WARN_CLOSE
(
c
.
GetVal
(),
1.0
f
,
tolerance
);
FIXED_
BOOST_WARN_CLOSE
(
c
.
GetRed
(),
0.5
f
,
tolerance
);
FIXED_
BOOST_WARN_CLOSE
(
c
.
GetGreen
(),
0.5
f
,
tolerance
);
FIXED_
BOOST_WARN_CLOSE
(
c
.
GetBlue
(),
1.0
f
,
tolerance
);
FIXED_
BOOST_WARN_CLOSE
(
c
.
GetHue
(),
4.0
f
/
6.0
f
,
tolerance
);
FIXED_
BOOST_WARN_CLOSE
(
c
.
GetSat
(),
0.5
f
,
tolerance
);
FIXED_
BOOST_WARN_CLOSE
(
c
.
GetVal
(),
1.0
f
,
tolerance
);
c
=
HSV
(
5.0
/
6.0
,
1.0
f
,
1.0
f
);
// purple
BOOST_WARN_CLOSE
(
c
.
GetRed
(),
1.0
f
,
tolerance
);
BOOST_WARN_CLOSE
(
c
.
GetGreen
(),
0.0
f
,
tolerance
);
BOOST_WARN_CLOSE
(
c
.
GetBlue
(),
1.0
f
,
tolerance
);
BOOST_WARN_CLOSE
(
c
.
GetHue
(),
5.0
f
/
6.0
f
,
tolerance
);
BOOST_WARN_CLOSE
(
c
.
GetSat
(),
1.0
f
,
tolerance
);
BOOST_WARN_CLOSE
(
c
.
GetVal
(),
1.0
f
,
tolerance
);
FIXED_
BOOST_WARN_CLOSE
(
c
.
GetRed
(),
1.0
f
,
tolerance
);
FIXED_
BOOST_WARN_CLOSE
(
c
.
GetGreen
(),
0.0
f
,
tolerance
);
FIXED_
BOOST_WARN_CLOSE
(
c
.
GetBlue
(),
1.0
f
,
tolerance
);
FIXED_
BOOST_WARN_CLOSE
(
c
.
GetHue
(),
5.0
f
/
6.0
f
,
tolerance
);
FIXED_
BOOST_WARN_CLOSE
(
c
.
GetSat
(),
1.0
f
,
tolerance
);
FIXED_
BOOST_WARN_CLOSE
(
c
.
GetVal
(),
1.0
f
,
tolerance
);
}
BOOST_AUTO_TEST_CASE
(
set_char
)
...
...
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