Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
LEFEBVREJP email
radix
Commits
fb03d022
Commit
fb03d022
authored
Apr 06, 2018
by
LEFEBVREJP email
Browse files
Capturing all of the failure cases in CoordinateConversion::validate().
parent
3f44cc35
Pipeline
#12882
passed with stages
in 9 minutes and 45 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
radixgeo/tests/tstCoordinateConversion.cc
View file @
fb03d022
...
...
@@ -22,6 +22,46 @@ TEST(Radixgeo, CoordinateRange)
"[-180,180)."
,
error_message
);
}
try
{
CoordinateConversion
::
validate
(
91
,
-
179
);
}
catch
(
std
::
out_of_range
e
)
{
std
::
string
error_message
(
e
.
what
());
EXPECT_EQ
(
"Invalid coordinate [91,-179].
\n
Latitude must be [-90.,90.] and "
"longitude must be "
"[-180,180)."
,
error_message
);
}
try
{
CoordinateConversion
::
validate
(
-
80
,
-
190
);
}
catch
(
std
::
out_of_range
e
)
{
std
::
string
error_message
(
e
.
what
());
EXPECT_EQ
(
"Invalid coordinate [-80,-190].
\n
Latitude must be [-90.,90.] and "
"longitude must be "
"[-180,180)."
,
error_message
);
}
try
{
CoordinateConversion
::
validate
(
-
80
,
190
);
}
catch
(
std
::
out_of_range
e
)
{
std
::
string
error_message
(
e
.
what
());
EXPECT_EQ
(
"Invalid coordinate [-80,190].
\n
Latitude must be [-90.,90.] and "
"longitude must be "
"[-180,180)."
,
error_message
);
}
}
TEST
(
Radixgeo
,
CoordinateConversion
)
{}
Write
Preview
Supports
Markdown
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!
Cancel
Please
register
or
sign in
to comment