[vala/0.40] tests: Extend "GenericAccessors" test to increase coverage
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/0.40] tests: Extend "GenericAccessors" test to increase coverage
- Date: Tue, 24 Mar 2020 09:46:10 +0000 (UTC)
commit ae6c3d9d2a6303cf81d7a136e4e9ec41115ca6fd
Author: Rico Tzschichholz <ricotz ubuntu com>
Date: Sat Mar 7 10:50:21 2020 +0100
tests: Extend "GenericAccessors" test to increase coverage
tests/generics/bug640330.vala | 4 ++++
1 file changed, 4 insertions(+)
---
diff --git a/tests/generics/bug640330.vala b/tests/generics/bug640330.vala
index 44c5cd9a5..e57ccb074 100644
--- a/tests/generics/bug640330.vala
+++ b/tests/generics/bug640330.vala
@@ -1,6 +1,10 @@
[GenericAccessors]
interface Foo<G> : Object {
public virtual G get_foo (G g) {
+ assert (typeof (G) == typeof (string));
+ G g_copy = g;
+ assert (GLib.strcmp ((string) g_copy, "foo") == 0);
+ assert (g_copy != g);
return g;
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]