[rygel/wip/tracker-3.0: 22/33] tests: Catch exceptions
- From: Jens Georg <jensgeorg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [rygel/wip/tracker-3.0: 22/33] tests: Catch exceptions
- Date: Fri, 26 Jun 2020 13:34:40 +0000 (UTC)
commit 50f9c9bbc0f7a80eab04e03fdbacf6c0db066872
Author: Jens Georg <mail jensge org>
Date: Fri Apr 24 17:34:14 2020 +0200
tests: Catch exceptions
tests/rygel-meta-config-test.vala | 14 +++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)
---
diff --git a/tests/rygel-meta-config-test.vala b/tests/rygel-meta-config-test.vala
index 147748bc..0c2d94ec 100644
--- a/tests/rygel-meta-config-test.vala
+++ b/tests/rygel-meta-config-test.vala
@@ -49,13 +49,21 @@ test_meta_config_overrides () {
// Check that signalling a change for a value that only exists
// on lower priority will trigger a signal on the MetaConfig
- assert_true (instance.get_enabled (SECTION_A));
- assert_true (instance.get_enabled (SECTION_B));
+ try {
+ assert_true (instance.get_enabled (SECTION_A));
+ assert_true (instance.get_enabled (SECTION_B));
+ } catch (Error e) {
+ assert_not_reached ();
+ }
var id = instance.section_changed.connect ((section, entry) => {
assert_true (section == SECTION_B);
assert_true (entry == Rygel.SectionEntry.ENABLED);
- assert_false (instance.get_enabled (section));
+ try {
+ assert_false (instance.get_enabled (section));
+ } catch (Error e) {
+ assert_not_reached ();
+ }
});
second_config.toggl_enable (SECTION_B);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]