summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJens Georg <mail@jensge.org>2020-08-01 16:18:13 +0200
committerJens Georg <mail@jensge.org>2020-08-02 09:59:55 +0200
commitec94db84ed7f7243082ace37c71da0ce50414aae (patch)
tree58f8cda01f49954c8bd44170361a545e042fd8bb /tests
parente203bb48e55d62b77291bb65a169c9696f64d101 (diff)
downloadrygel-ec94db84ed7f7243082ace37c71da0ce50414aae.tar.gz
test: Remove some warnings
Diffstat (limited to 'tests')
-rw-r--r--tests/time-seek/rygel-http-time-seek-test.vala30
1 files changed, 10 insertions, 20 deletions
diff --git a/tests/time-seek/rygel-http-time-seek-test.vala b/tests/time-seek/rygel-http-time-seek-test.vala
index c6715711..1b51840a 100644
--- a/tests/time-seek/rygel-http-time-seek-test.vala
+++ b/tests/time-seek/rygel-http-time-seek-test.vala
@@ -28,63 +28,53 @@ void test_time_seek_malformed_header () {
// Test without the header
try {
- var request = new Rygel.HTTPTimeSeekRequest (message, handler, null);
+ new Rygel.HTTPTimeSeekRequest (message, handler, null);
assert_not_reached ();
- } catch (Rygel.HTTPSeekRequestError e) {
+ } catch (Error e) {
// Pass - we only expect a HTTPSeekRequestError
assert (e is Rygel.HTTPSeekRequestError.INVALID_RANGE);
- } catch (Error e) {
- assert_not_reached ();
}
// Test empty header
message.request_headers.replace (Rygel.HTTPTimeSeekRequest.TIMESEEKRANGE_HEADER, "");
try {
- var request = new Rygel.HTTPTimeSeekRequest (message, handler, null);
+ new Rygel.HTTPTimeSeekRequest (message, handler, null);
assert_not_reached ();
- } catch (Rygel.HTTPSeekRequestError e) {
+ } catch (Error e) {
// Pass - we only expect a HTTPSeekRequestError
assert (e is Rygel.HTTPSeekRequestError.INVALID_RANGE);
- } catch (Error e) {
- assert_not_reached ();
}
// Test empty header
message.request_headers.replace (Rygel.HTTPTimeSeekRequest.TIMESEEKRANGE_HEADER, "npt=kjalsjd lsdjldskj lkfdsj ");
try {
- var request = new Rygel.HTTPTimeSeekRequest (message, handler, null);
+ new Rygel.HTTPTimeSeekRequest (message, handler, null);
assert_not_reached ();
- } catch (Rygel.HTTPSeekRequestError e) {
+ } catch (Error e) {
// Pass - we only expect a HTTPSeekRequestError
assert (e is Rygel.HTTPSeekRequestError.INVALID_RANGE);
- } catch (Error e) {
- assert_not_reached ();
}
// Must not have white-spaces before npt=
message.request_headers.replace (Rygel.HTTPTimeSeekRequest.TIMESEEKRANGE_HEADER,
" npt=0.000-");
try {
- var request = new Rygel.HTTPTimeSeekRequest (message, handler, null);
+ new Rygel.HTTPTimeSeekRequest (message, handler, null);
assert_not_reached ();
- } catch (Rygel.HTTPSeekRequestError e) {
+ } catch (Error e) {
// Pass - we only expect a HTTPSeekRequestError
assert (e is Rygel.HTTPSeekRequestError.INVALID_RANGE);
- } catch (Error e) {
- assert_not_reached ();
}
// Must not have white-spaces in the time
message.request_headers.replace (Rygel.HTTPTimeSeekRequest.TIMESEEKRANGE_HEADER,
"npt = 00 : 05 : 35.3-00");
try {
- var request = new Rygel.HTTPTimeSeekRequest (message, handler, null);
+ new Rygel.HTTPTimeSeekRequest (message, handler, null);
assert_not_reached ();
- } catch (Rygel.HTTPSeekRequestError e) {
+ } catch (Error e) {
// Pass - we only expect a HTTPSeekRequestError
assert (e is Rygel.HTTPSeekRequestError.INVALID_RANGE);
- } catch (Error e) {
- assert_not_reached ();
}
}